<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE BangPatterns #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE MagicHash #-}</span><span>
</span><span id="line-3"></span><span>
</span><span id="line-4"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-5"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-6"></span><span class="hs-comment">-- Module      :  GHC.Utils.Ppr</span><span>
</span><span id="line-7"></span><span class="hs-comment">-- Copyright   :  (c) The University of Glasgow 2001</span><span>
</span><span id="line-8"></span><span class="hs-comment">-- License     :  BSD-style (see the file LICENSE)</span><span>
</span><span id="line-9"></span><span class="hs-comment">--</span><span>
</span><span id="line-10"></span><span class="hs-comment">-- Maintainer  :  David Terei &lt;code@davidterei.com&gt;</span><span>
</span><span id="line-11"></span><span class="hs-comment">-- Stability   :  stable</span><span>
</span><span id="line-12"></span><span class="hs-comment">-- Portability :  portable</span><span>
</span><span id="line-13"></span><span class="hs-comment">--</span><span>
</span><span id="line-14"></span><span class="hs-comment">-- John Hughes's and Simon Peyton Jones's Pretty Printer Combinators</span><span>
</span><span id="line-15"></span><span class="hs-comment">--</span><span>
</span><span id="line-16"></span><span class="hs-comment">-- Based on /The Design of a Pretty-printing Library/</span><span>
</span><span id="line-17"></span><span class="hs-comment">-- in Advanced Functional Programming,</span><span>
</span><span id="line-18"></span><span class="hs-comment">-- Johan Jeuring and Erik Meijer (eds), LNCS 925</span><span>
</span><span id="line-19"></span><span class="hs-comment">-- &lt;http://www.cse.chalmers.se/~rjmh/Papers/pretty.ps&gt;</span><span>
</span><span id="line-20"></span><span class="hs-comment">--</span><span>
</span><span id="line-21"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-22"></span><span>
</span><span id="line-23"></span><span class="hs-comment">{-
Note [Differences between libraries/pretty and compiler/GHC/Utils/Ppr.hs]

For historical reasons, there are two different copies of `Pretty` in the GHC
source tree:
 * `libraries/pretty` is a submodule containing
   https://github.com/haskell/pretty. This is the `pretty` library as released
   on hackage. It is used by several other libraries in the GHC source tree
   (e.g. template-haskell and Cabal).
 * `compiler/GHC/Utils/Ppr.hs` (this module). It is used by GHC only.

There is an ongoing effort in https://github.com/haskell/pretty/issues/1 and
https://gitlab.haskell.org/ghc/ghc/issues/10735 to try to get rid of GHC's copy
of Pretty.

Currently, GHC's copy of Pretty resembles pretty-1.1.2.0, with the following
major differences:
 * GHC's copy uses `Faststring` for performance reasons.
 * GHC's copy has received a backported bugfix for #12227, which was
   released as pretty-1.1.3.4 (&quot;Remove harmful $! forcing in beside&quot;,
   https://github.com/haskell/pretty/pull/35).

Other differences are minor. Both copies define some extra functions and
instances not defined in the other copy. To see all differences, do this in a
ghc git tree:

    $ cd libraries/pretty
    $ git checkout v1.1.2.0
    $ cd -
    $ vimdiff compiler/GHC/Utils/Ppr.hs \
              libraries/pretty/src/Text/PrettyPrint/HughesPJ.hs

For parity with `pretty-1.1.2.1`, the following two `pretty` commits would
have to be backported:
  * &quot;Resolve foldr-strictness stack overflow bug&quot;
    (307b8173f41cd776eae8f547267df6d72bff2d68)
  * &quot;Special-case reduce for horiz/vert&quot;
    (c57c7a9dfc49617ba8d6e4fcdb019a3f29f1044c)
This has not been done sofar, because these commits seem to cause more
allocation in the compiler (see thomie's comments in
https://github.com/haskell/pretty/pull/9).
-}</span><span>
</span><span id="line-65"></span><span>
</span><span id="line-66"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Utils.Ppr</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-67"></span><span>
</span><span id="line-68"></span><span>        </span><span class="annot"><span class="hs-comment">-- * The document type</span></span><span>
</span><span id="line-69"></span><span>        </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier">Doc</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#TextDetails"><span class="hs-identifier">TextDetails</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-70"></span><span>
</span><span id="line-71"></span><span>        </span><span class="annot"><span class="hs-comment">-- * Constructing documents</span></span><span>
</span><span id="line-72"></span><span>
</span><span id="line-73"></span><span>        </span><span class="annot"><span class="hs-comment">-- ** Converting values into documents</span></span><span>
</span><span id="line-74"></span><span>        </span><span class="annot"><a href="GHC.Utils.Ppr.html#char"><span class="hs-identifier">char</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#text"><span class="hs-identifier">text</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#ftext"><span class="hs-identifier">ftext</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#ptext"><span class="hs-identifier">ptext</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#ztext"><span class="hs-identifier">ztext</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#sizedText"><span class="hs-identifier">sizedText</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#zeroWidthText"><span class="hs-identifier">zeroWidthText</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-75"></span><span>        </span><span class="annot"><a href="GHC.Utils.Ppr.html#int"><span class="hs-identifier">int</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#integer"><span class="hs-identifier">integer</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#float"><span class="hs-identifier">float</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#double"><span class="hs-identifier">double</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#rational"><span class="hs-identifier">rational</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#hex"><span class="hs-identifier">hex</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-76"></span><span>
</span><span id="line-77"></span><span>        </span><span class="annot"><span class="hs-comment">-- ** Simple derived documents</span></span><span>
</span><span id="line-78"></span><span>        </span><span class="annot"><a href="GHC.Utils.Ppr.html#semi"><span class="hs-identifier">semi</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#comma"><span class="hs-identifier">comma</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#colon"><span class="hs-identifier">colon</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#space"><span class="hs-identifier">space</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#equals"><span class="hs-identifier">equals</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-79"></span><span>        </span><span class="annot"><a href="GHC.Utils.Ppr.html#lparen"><span class="hs-identifier">lparen</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#rparen"><span class="hs-identifier">rparen</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#lbrack"><span class="hs-identifier">lbrack</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#rbrack"><span class="hs-identifier">rbrack</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#lbrace"><span class="hs-identifier">lbrace</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#rbrace"><span class="hs-identifier">rbrace</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-80"></span><span>
</span><span id="line-81"></span><span>        </span><span class="annot"><span class="hs-comment">-- ** Wrapping documents in delimiters</span></span><span>
</span><span id="line-82"></span><span>        </span><span class="annot"><a href="GHC.Utils.Ppr.html#parens"><span class="hs-identifier">parens</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#brackets"><span class="hs-identifier">brackets</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#braces"><span class="hs-identifier">braces</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#quotes"><span class="hs-identifier">quotes</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#quote"><span class="hs-identifier">quote</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#doubleQuotes"><span class="hs-identifier">doubleQuotes</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-83"></span><span>        </span><span class="annot"><a href="GHC.Utils.Ppr.html#maybeParens"><span class="hs-identifier">maybeParens</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-84"></span><span>
</span><span id="line-85"></span><span>        </span><span class="annot"><span class="hs-comment">-- ** Combining documents</span></span><span>
</span><span id="line-86"></span><span>        </span><span class="annot"><a href="GHC.Utils.Ppr.html#empty"><span class="hs-identifier">empty</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-87"></span><span>        </span><span class="annot"><a href="GHC.Utils.Ppr.html#%3C%3E"><span class="hs-operator">(&lt;&gt;)</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#%3C%2B%3E"><span class="hs-operator">(&lt;+&gt;)</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#hcat"><span class="hs-identifier">hcat</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#hsep"><span class="hs-identifier">hsep</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-88"></span><span>        </span><span class="annot"><a href="GHC.Utils.Ppr.html#%24%24"><span class="hs-operator">($$)</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#%24%2B%24"><span class="hs-operator">($+$)</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#vcat"><span class="hs-identifier">vcat</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-89"></span><span>        </span><span class="annot"><a href="GHC.Utils.Ppr.html#sep"><span class="hs-identifier">sep</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#cat"><span class="hs-identifier">cat</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-90"></span><span>        </span><span class="annot"><a href="GHC.Utils.Ppr.html#fsep"><span class="hs-identifier">fsep</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#fcat"><span class="hs-identifier">fcat</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-91"></span><span>        </span><span class="annot"><a href="GHC.Utils.Ppr.html#nest"><span class="hs-identifier">nest</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-92"></span><span>        </span><span class="annot"><a href="GHC.Utils.Ppr.html#hang"><span class="hs-identifier">hang</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#hangNotEmpty"><span class="hs-identifier">hangNotEmpty</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#punctuate"><span class="hs-identifier">punctuate</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-93"></span><span>
</span><span id="line-94"></span><span>        </span><span class="annot"><span class="hs-comment">-- * Predicates on documents</span></span><span>
</span><span id="line-95"></span><span>        </span><span class="annot"><a href="GHC.Utils.Ppr.html#isEmpty"><span class="hs-identifier">isEmpty</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-96"></span><span>
</span><span id="line-97"></span><span>        </span><span class="annot"><span class="hs-comment">-- * Rendering documents</span></span><span>
</span><span id="line-98"></span><span>
</span><span id="line-99"></span><span>        </span><span class="annot"><span class="hs-comment">-- ** Rendering with a particular style</span></span><span>
</span><span id="line-100"></span><span>        </span><span class="annot"><a href="GHC.Utils.Ppr.html#Style"><span class="hs-identifier">Style</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-101"></span><span>        </span><span class="annot"><a href="GHC.Utils.Ppr.html#style"><span class="hs-identifier">style</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-102"></span><span>        </span><span class="annot"><a href="GHC.Utils.Ppr.html#renderStyle"><span class="hs-identifier">renderStyle</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-103"></span><span>        </span><span class="annot"><a href="GHC.Utils.Ppr.html#Mode"><span class="hs-identifier">Mode</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-104"></span><span>
</span><span id="line-105"></span><span>        </span><span class="annot"><span class="hs-comment">-- ** General rendering</span></span><span>
</span><span id="line-106"></span><span>        </span><span class="annot"><a href="GHC.Utils.Ppr.html#fullRender"><span class="hs-identifier">fullRender</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#txtPrinter"><span class="hs-identifier">txtPrinter</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-107"></span><span>
</span><span id="line-108"></span><span>        </span><span class="annot"><span class="hs-comment">-- ** GHC-specific rendering</span></span><span>
</span><span id="line-109"></span><span>        </span><span class="annot"><a href="GHC.Utils.Ppr.html#printDoc"><span class="hs-identifier">printDoc</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#printDoc_"><span class="hs-identifier">printDoc_</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-110"></span><span>        </span><span class="annot"><a href="GHC.Utils.Ppr.html#bufLeftRender"><span class="hs-identifier">bufLeftRender</span></a></span><span> </span><span class="hs-comment">-- performance hack</span><span>
</span><span id="line-111"></span><span>
</span><span id="line-112"></span><span>  </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-113"></span><span>
</span><span id="line-114"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span> </span><span class="hs-keyword">hiding</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier">error</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-115"></span><span>
</span><span id="line-116"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.BufHandle.html"><span class="hs-identifier">GHC.Utils.BufHandle</span></a></span><span>
</span><span id="line-117"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Data.FastString.html"><span class="hs-identifier">GHC.Data.FastString</span></a></span><span>
</span><span id="line-118"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Panic.Plain.html"><span class="hs-identifier">GHC.Utils.Panic.Plain</span></a></span><span>
</span><span id="line-119"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/System.IO.html#"><span class="hs-identifier">System.IO</span></a></span><span>
</span><span id="line-120"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Numeric.html#"><span class="hs-identifier">Numeric</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Numeric.html#showHex"><span class="hs-identifier">showHex</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-121"></span><span>
</span><span id="line-122"></span><span class="hs-comment">--for a RULES</span><span>
</span><span id="line-123"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#"><span class="hs-identifier">GHC.Base</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><span class="hs-identifier">unpackCString#</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="hs-identifier">unpackNBytes#</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="hs-identifier">Int</span></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-124"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/GHC.Ptr.html#"><span class="hs-identifier">GHC.Ptr</span></a></span><span>  </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="../../base/src/GHC.Ptr.html#Ptr"><span class="hs-identifier">Ptr</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-125"></span><span>
</span><span id="line-126"></span><span class="hs-comment">-- ---------------------------------------------------------------------------</span><span>
</span><span id="line-127"></span><span class="hs-comment">-- The Doc calculus</span><span>
</span><span id="line-128"></span><span>
</span><span id="line-129"></span><span class="hs-comment">{-
Laws for $$
~~~~~~~~~~~
&lt;a1&gt;    (x $$ y) $$ z   = x $$ (y $$ z)
&lt;a2&gt;    empty $$ x      = x
&lt;a3&gt;    x $$ empty      = x

        ...ditto $+$...

Laws for &lt;&gt;
~~~~~~~~~~~
&lt;b1&gt;    (x &lt;&gt; y) &lt;&gt; z   = x &lt;&gt; (y &lt;&gt; z)
&lt;b2&gt;    empty &lt;&gt; x      = empty
&lt;b3&gt;    x &lt;&gt; empty      = x

        ...ditto &lt;+&gt;...

Laws for text
~~~~~~~~~~~~~
&lt;t1&gt;    text s &lt;&gt; text t        = text (s++t)
&lt;t2&gt;    text &quot;&quot; &lt;&gt; x            = x, if x non-empty

** because of law n6, t2 only holds if x doesn't
** start with `nest'.


Laws for nest
~~~~~~~~~~~~~
&lt;n1&gt;    nest 0 x                = x
&lt;n2&gt;    nest k (nest k' x)      = nest (k+k') x
&lt;n3&gt;    nest k (x &lt;&gt; y)         = nest k x &lt;&gt; nest k y
&lt;n4&gt;    nest k (x $$ y)         = nest k x $$ nest k y
&lt;n5&gt;    nest k empty            = empty
&lt;n6&gt;    x &lt;&gt; nest k y           = x &lt;&gt; y, if x non-empty

** Note the side condition on &lt;n6&gt;!  It is this that
** makes it OK for empty to be a left unit for &lt;&gt;.

Miscellaneous
~~~~~~~~~~~~~
&lt;m1&gt;    (text s &lt;&gt; x) $$ y = text s &lt;&gt; ((text &quot;&quot; &lt;&gt; x) $$
                                         nest (-length s) y)

&lt;m2&gt;    (x $$ y) &lt;&gt; z = x $$ (y &lt;&gt; z)
        if y non-empty


Laws for list versions
~~~~~~~~~~~~~~~~~~~~~~
&lt;l1&gt;    sep (ps++[empty]++qs)   = sep (ps ++ qs)
        ...ditto hsep, hcat, vcat, fill...

&lt;l2&gt;    nest k (sep ps) = sep (map (nest k) ps)
        ...ditto hsep, hcat, vcat, fill...

Laws for oneLiner
~~~~~~~~~~~~~~~~~
&lt;o1&gt;    oneLiner (nest k p) = nest k (oneLiner p)
&lt;o2&gt;    oneLiner (x &lt;&gt; y)   = oneLiner x &lt;&gt; oneLiner y

You might think that the following version of &lt;m1&gt; would
be neater:

&lt;3 NO&gt;  (text s &lt;&gt; x) $$ y = text s &lt;&gt; ((empty &lt;&gt; x)) $$
                                         nest (-length s) y)

But it doesn't work, for if x=empty, we would have

        text s $$ y = text s &lt;&gt; (empty $$ nest (-length s) y)
                    = text s &lt;&gt; nest (-length s) y
-}</span><span>
</span><span id="line-200"></span><span>
</span><span id="line-201"></span><span class="hs-comment">-- ---------------------------------------------------------------------------</span><span>
</span><span id="line-202"></span><span class="hs-comment">-- Operator fixity</span><span>
</span><span id="line-203"></span><span>
</span><span id="line-204"></span><span class="hs-keyword">infixl</span><span> </span><span class="hs-number">6</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#%3C%3E"><span class="hs-operator hs-type">&lt;&gt;</span></a></span><span>
</span><span id="line-205"></span><span class="hs-keyword">infixl</span><span> </span><span class="hs-number">6</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#%3C%2B%3E"><span class="hs-operator hs-type">&lt;+&gt;</span></a></span><span>
</span><span id="line-206"></span><span class="hs-keyword">infixl</span><span> </span><span class="hs-number">5</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#%24%24"><span class="hs-operator hs-type">$$</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#%24%2B%24"><span class="hs-operator hs-type">$+$</span></a></span><span>
</span><span id="line-207"></span><span>
</span><span id="line-208"></span><span>
</span><span id="line-209"></span><span class="hs-comment">-- ---------------------------------------------------------------------------</span><span>
</span><span id="line-210"></span><span class="hs-comment">-- The Doc data type</span><span>
</span><span id="line-211"></span><span>
</span><span id="line-212"></span><span class="hs-comment">-- | The abstract type of documents.</span><span>
</span><span id="line-213"></span><span class="hs-comment">-- A Doc represents a *set* of layouts. A Doc with</span><span>
</span><span id="line-214"></span><span class="hs-comment">-- no occurrences of Union or NoDoc represents just one layout.</span><span>
</span><span id="line-215"></span><span class="hs-keyword">data</span><span> </span><span id="Doc"><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-var">Doc</span></a></span></span><span>
</span><span id="line-216"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="Empty"><span class="annot"><a href="GHC.Utils.Ppr.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span></span><span>                                            </span><span class="hs-comment">-- empty</span><span>
</span><span id="line-217"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="NilAbove"><span class="annot"><a href="GHC.Utils.Ppr.html#NilAbove"><span class="hs-identifier hs-var">NilAbove</span></a></span></span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span>                                     </span><span class="hs-comment">-- text &quot;&quot; $$ x</span><span>
</span><span id="line-218"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="TextBeside"><span class="annot"><a href="GHC.Utils.Ppr.html#TextBeside"><span class="hs-identifier hs-var">TextBeside</span></a></span></span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="GHC.Utils.Ppr.html#TextDetails"><span class="hs-identifier hs-type">TextDetails</span></a></span><span> </span><span class="hs-pragma">{-# UNPACK</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-glyph">!</span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span>  </span><span class="hs-comment">-- text s &lt;&gt; x</span><span>
</span><span id="line-219"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="Nest"><span class="annot"><a href="GHC.Utils.Ppr.html#Nest"><span class="hs-identifier hs-var">Nest</span></a></span></span><span> </span><span class="hs-pragma">{-# UNPACK</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-glyph">!</span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span>                     </span><span class="hs-comment">-- nest k x</span><span>
</span><span id="line-220"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="Union"><span class="annot"><a href="GHC.Utils.Ppr.html#Union"><span class="hs-identifier hs-var">Union</span></a></span></span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span>                                    </span><span class="hs-comment">-- ul `union` ur</span><span>
</span><span id="line-221"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="NoDoc"><span class="annot"><a href="GHC.Utils.Ppr.html#NoDoc"><span class="hs-identifier hs-var">NoDoc</span></a></span></span><span>                                            </span><span class="hs-comment">-- The empty set of documents</span><span>
</span><span id="line-222"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="Beside"><span class="annot"><a href="GHC.Utils.Ppr.html#Beside"><span class="hs-identifier hs-var">Beside</span></a></span></span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span>                              </span><span class="hs-comment">-- True &lt;=&gt; space between</span><span>
</span><span id="line-223"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="Above"><span class="annot"><a href="GHC.Utils.Ppr.html#Above"><span class="hs-identifier hs-var">Above</span></a></span></span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span>                               </span><span class="hs-comment">-- True &lt;=&gt; never overlap</span><span>
</span><span id="line-224"></span><span>
</span><span id="line-225"></span><span class="hs-comment">{-
Here are the invariants:

1) The argument of NilAbove is never Empty. Therefore
   a NilAbove occupies at least two lines.

2) The argument of @TextBeside@ is never @Nest@.

3) The layouts of the two arguments of @Union@ both flatten to the same
   string.

4) The arguments of @Union@ are either @TextBeside@, or @NilAbove@.

5) A @NoDoc@ may only appear on the first line of the left argument of an
   union. Therefore, the right argument of an union can never be equivalent
   to the empty set (@NoDoc@).

6) An empty document is always represented by @Empty@.  It can't be
   hidden inside a @Nest@, or a @Union@ of two @Empty@s.

7) The first line of every layout in the left argument of @Union@ is
   longer than the first line of any layout in the right argument.
   (1) ensures that the left argument has a first line.  In view of
   (3), this invariant means that the right argument must have at
   least two lines.

Notice the difference between
   * NoDoc (no documents)
   * Empty (one empty document; no height and no width)
   * text &quot;&quot; (a document containing the empty string;
              one line high, but has no width)
-}</span><span>
</span><span id="line-257"></span><span>
</span><span id="line-258"></span><span>
</span><span id="line-259"></span><span class="hs-comment">-- | RDoc is a &quot;reduced GDoc&quot;, guaranteed not to have a top-level Above or Beside.</span><span>
</span><span id="line-260"></span><span class="hs-keyword">type</span><span> </span><span id="RDoc"><span class="annot"><a href="GHC.Utils.Ppr.html#RDoc"><span class="hs-identifier hs-var">RDoc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span>
</span><span id="line-261"></span><span>
</span><span id="line-262"></span><span class="hs-comment">-- | The TextDetails data type</span><span>
</span><span id="line-263"></span><span class="hs-comment">--</span><span>
</span><span id="line-264"></span><span class="hs-comment">-- A TextDetails represents a fragment of text that will be</span><span>
</span><span id="line-265"></span><span class="hs-comment">-- output at some point.</span><span>
</span><span id="line-266"></span><span class="hs-keyword">data</span><span> </span><span id="TextDetails"><span class="annot"><a href="GHC.Utils.Ppr.html#TextDetails"><span class="hs-identifier hs-var">TextDetails</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="Chr"><span class="annot"><a href="GHC.Utils.Ppr.html#Chr"><span class="hs-identifier hs-var">Chr</span></a></span></span><span>  </span><span class="hs-pragma">{-# UNPACK</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-glyph">!</span><span class="annot"><span class="hs-identifier hs-type">Char</span></span><span> </span><span class="hs-comment">-- ^ A single Char fragment</span><span>
</span><span id="line-267"></span><span>                 </span><span class="hs-glyph">|</span><span> </span><span id="Str"><span class="annot"><a href="GHC.Utils.Ppr.html#Str"><span class="hs-identifier hs-var">Str</span></a></span></span><span>  </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-comment">-- ^ A whole String fragment</span><span>
</span><span id="line-268"></span><span>                 </span><span class="hs-glyph">|</span><span> </span><span id="PStr"><span class="annot"><a href="GHC.Utils.Ppr.html#PStr"><span class="hs-identifier hs-var">PStr</span></a></span></span><span> </span><span class="annot"><a href="GHC.Data.FastString.html#FastString"><span class="hs-identifier hs-type">FastString</span></a></span><span>                      </span><span class="hs-comment">-- a hashed string</span><span>
</span><span id="line-269"></span><span>                 </span><span class="hs-glyph">|</span><span> </span><span id="ZStr"><span class="annot"><a href="GHC.Utils.Ppr.html#ZStr"><span class="hs-identifier hs-var">ZStr</span></a></span></span><span> </span><span class="annot"><a href="GHC.Data.FastString.html#FastZString"><span class="hs-identifier hs-type">FastZString</span></a></span><span>                     </span><span class="hs-comment">-- a z-encoded string</span><span>
</span><span id="line-270"></span><span>                 </span><span class="hs-glyph">|</span><span> </span><span id="LStr"><span class="annot"><a href="GHC.Utils.Ppr.html#LStr"><span class="hs-identifier hs-var">LStr</span></a></span></span><span> </span><span class="hs-pragma">{-# UNPACK</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="GHC.Data.FastString.html#PtrString"><span class="hs-identifier hs-type">PtrString</span></a></span><span>
</span><span id="line-271"></span><span>                   </span><span class="hs-comment">-- a '\0'-terminated array of bytes</span><span>
</span><span id="line-272"></span><span>                 </span><span class="hs-glyph">|</span><span> </span><span id="RStr"><span class="annot"><a href="GHC.Utils.Ppr.html#RStr"><span class="hs-identifier hs-var">RStr</span></a></span></span><span> </span><span class="hs-pragma">{-# UNPACK</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-glyph">!</span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-pragma">{-# UNPACK</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-glyph">!</span><span class="annot"><span class="hs-identifier hs-type">Char</span></span><span>
</span><span id="line-273"></span><span>                   </span><span class="hs-comment">-- a repeated character (e.g., ' ')</span><span>
</span><span id="line-274"></span><span>
</span><span id="line-275"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680783865"><span id="local-6989586621680783867"><span class="annot"><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-type">Show</span></a></span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-276"></span><span>  </span><span id="local-6989586621680783863"><span class="annot"><span class="annottext">showsPrec :: Int -&gt; Doc -&gt; ShowS
</span><a href="../../base/src/GHC.Show.html#showsPrec"><span class="hs-identifier hs-var hs-var hs-var hs-var">showsPrec</span></a></span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680783861"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783861"><span class="hs-identifier hs-var">doc</span></a></span></span><span> </span><span id="local-6989586621680783860"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680783860"><span class="hs-identifier hs-var">cont</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Mode
-&gt; Int
-&gt; Float
-&gt; (TextDetails -&gt; ShowS)
-&gt; String
-&gt; Doc
-&gt; String
forall a.
Mode -&gt; Int -&gt; Float -&gt; (TextDetails -&gt; a -&gt; a) -&gt; a -&gt; Doc -&gt; a
</span><a href="GHC.Utils.Ppr.html#fullRender"><span class="hs-identifier hs-var">fullRender</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Style -&gt; Mode
</span><a href="GHC.Utils.Ppr.html#mode"><span class="hs-identifier hs-var hs-var">mode</span></a></span><span> </span><span class="annot"><span class="annottext">Style
</span><a href="GHC.Utils.Ppr.html#style"><span class="hs-identifier hs-var">style</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Style -&gt; Int
</span><a href="GHC.Utils.Ppr.html#lineLength"><span class="hs-identifier hs-var hs-var">lineLength</span></a></span><span> </span><span class="annot"><span class="annottext">Style
</span><a href="GHC.Utils.Ppr.html#style"><span class="hs-identifier hs-var">style</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-277"></span><span>                                    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Style -&gt; Float
</span><a href="GHC.Utils.Ppr.html#ribbonsPerLine"><span class="hs-identifier hs-var hs-var">ribbonsPerLine</span></a></span><span> </span><span class="annot"><span class="annottext">Style
</span><a href="GHC.Utils.Ppr.html#style"><span class="hs-identifier hs-var">style</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-278"></span><span>                                    </span><span class="annot"><span class="annottext">TextDetails -&gt; ShowS
</span><a href="GHC.Utils.Ppr.html#txtPrinter"><span class="hs-identifier hs-var">txtPrinter</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680783860"><span class="hs-identifier hs-var">cont</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783861"><span class="hs-identifier hs-var">doc</span></a></span><span>
</span><span id="line-279"></span><span>
</span><span id="line-280"></span><span>
</span><span id="line-281"></span><span class="hs-comment">-- ---------------------------------------------------------------------------</span><span>
</span><span id="line-282"></span><span class="hs-comment">-- Values and Predicates on GDocs and TextDetails</span><span>
</span><span id="line-283"></span><span>
</span><span id="line-284"></span><span class="hs-comment">-- | A document of height and width 1, containing a literal character.</span><span>
</span><span id="line-285"></span><span class="annot"><a href="GHC.Utils.Ppr.html#char"><span class="hs-identifier hs-type">char</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Char</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span>
</span><span id="line-286"></span><span id="char"><span class="annot"><span class="annottext">char :: Char -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#char"><span class="hs-identifier hs-var hs-var">char</span></a></span></span><span> </span><span id="local-6989586621680783856"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621680783856"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TextDetails -&gt; Int -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#textBeside_"><span class="hs-identifier hs-var">textBeside_</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; TextDetails
</span><a href="GHC.Utils.Ppr.html#Chr"><span class="hs-identifier hs-var">Chr</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621680783856"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span>
</span><span id="line-287"></span><span>
</span><span id="line-288"></span><span class="hs-comment">-- | A document of height 1 containing a literal string.</span><span>
</span><span id="line-289"></span><span class="hs-comment">-- 'text' satisfies the following laws:</span><span>
</span><span id="line-290"></span><span class="hs-comment">--</span><span>
</span><span id="line-291"></span><span class="hs-comment">-- * @'text' s '&lt;&gt;' 'text' t = 'text' (s'++'t)@</span><span>
</span><span id="line-292"></span><span class="hs-comment">--</span><span>
</span><span id="line-293"></span><span class="hs-comment">-- * @'text' \&quot;\&quot; '&lt;&gt;' x = x@, if @x@ non-empty</span><span>
</span><span id="line-294"></span><span class="hs-comment">--</span><span>
</span><span id="line-295"></span><span class="hs-comment">-- The side condition on the last law is necessary because @'text' \&quot;\&quot;@</span><span>
</span><span id="line-296"></span><span class="hs-comment">-- has height 1, while 'empty' has no height.</span><span>
</span><span id="line-297"></span><span class="annot"><a href="GHC.Utils.Ppr.html#text"><span class="hs-identifier hs-type">text</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span>
</span><span id="line-298"></span><span id="text"><span class="annot"><span class="annottext">text :: String -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#text"><span class="hs-identifier hs-var hs-var">text</span></a></span></span><span> </span><span id="local-6989586621680783854"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680783854"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TextDetails -&gt; Int -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#textBeside_"><span class="hs-identifier hs-var">textBeside_</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; TextDetails
</span><a href="GHC.Utils.Ppr.html#Str"><span class="hs-identifier hs-var">Str</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680783854"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; Int
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Int
</span><a href="../../base/src/Data.Foldable.html#length"><span class="hs-identifier hs-var">length</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680783854"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span>
</span><span id="line-299"></span><span class="hs-pragma">{-# NOINLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">0</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#text"><span class="hs-pragma hs-type">text</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>   </span><span class="hs-comment">-- Give the RULE a chance to fire</span><span>
</span><span id="line-300"></span><span>                            </span><span class="hs-comment">-- It must wait till after phase 1 when</span><span>
</span><span id="line-301"></span><span>                            </span><span class="hs-comment">-- the unpackCString first is manifested</span><span>
</span><span id="line-302"></span><span>
</span><span id="line-303"></span><span class="hs-comment">-- RULE that turns (text &quot;abc&quot;) into (ptext (A# &quot;abc&quot;#)) to avoid the</span><span>
</span><span id="line-304"></span><span class="hs-comment">-- intermediate packing/unpacking of the string.</span><span>
</span><span id="line-305"></span><span class="hs-pragma">{-# RULES</span><span> </span><span class="annot"><span class="hs-pragma">&quot;text/str&quot;</span></span><span>
</span><span id="line-306"></span><span>    </span><span class="hs-pragma">forall</span><span> </span><span id="local-6989586621680783852"><span class="annot"><a href="#local-6989586621680783852"><span class="hs-pragma hs-var">a</span></a></span></span><span class="hs-pragma">.</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#text"><span class="hs-pragma hs-type">text</span></a></span><span> </span><span class="hs-pragma">(</span><span class="annot"><span class="hs-pragma hs-type">unpackCString#</span></span><span> </span><span class="annot"><a href="#local-6989586621680783852"><span class="hs-pragma hs-type">a</span></a></span><span class="hs-pragma">)</span><span>  </span><span class="hs-pragma">=</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#ptext"><span class="hs-pragma hs-type">ptext</span></a></span><span> </span><span class="hs-pragma">(</span><span class="annot"><a href="GHC.Data.FastString.html#mkPtrString%23"><span class="hs-pragma hs-type">mkPtrString#</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680783852"><span class="hs-pragma hs-type">a</span></a></span><span class="hs-pragma">)</span><span>
</span><span id="line-307"></span><span>  </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-308"></span><span class="hs-pragma">{-# RULES</span><span> </span><span class="annot"><span class="hs-pragma">&quot;text/unpackNBytes#&quot;</span></span><span>
</span><span id="line-309"></span><span>    </span><span class="hs-pragma">forall</span><span> </span><span id="local-6989586621680783850"><span class="annot"><a href="#local-6989586621680783850"><span class="hs-pragma hs-var">p</span></a></span></span><span> </span><span id="local-6989586621680783849"><span class="annot"><a href="#local-6989586621680783849"><span class="hs-pragma hs-var">n</span></a></span></span><span class="hs-pragma">.</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#text"><span class="hs-pragma hs-type">text</span></a></span><span> </span><span class="hs-pragma">(</span><span class="annot"><span class="hs-pragma hs-type">unpackNBytes#</span></span><span> </span><span class="annot"><a href="#local-6989586621680783850"><span class="hs-pragma hs-type">p</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680783849"><span class="hs-pragma hs-type">n</span></a></span><span class="hs-pragma">)</span><span> </span><span class="hs-pragma">=</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#ptext"><span class="hs-pragma hs-type">ptext</span></a></span><span> </span><span class="hs-pragma">(</span><span class="annot"><a href="GHC.Data.FastString.html#PtrString"><span class="hs-pragma hs-type">PtrString</span></a></span><span> </span><span class="hs-pragma">(</span><span class="annot"><a href="../../base/src/GHC.Ptr.html#Ptr"><span class="hs-pragma hs-type">Ptr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680783850"><span class="hs-pragma hs-type">p</span></a></span><span class="hs-pragma">)</span><span> </span><span class="hs-pragma">(</span><span class="annot"><span class="hs-pragma hs-type">I#</span></span><span> </span><span class="annot"><a href="#local-6989586621680783849"><span class="hs-pragma hs-type">n</span></a></span><span class="hs-pragma">)</span><span class="hs-pragma">)</span><span>
</span><span id="line-310"></span><span>  </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-311"></span><span>
</span><span id="line-312"></span><span class="annot"><a href="GHC.Utils.Ppr.html#ftext"><span class="hs-identifier hs-type">ftext</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Data.FastString.html#FastString"><span class="hs-identifier hs-type">FastString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span>
</span><span id="line-313"></span><span id="ftext"><span class="annot"><span class="annottext">ftext :: FastString -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#ftext"><span class="hs-identifier hs-var hs-var">ftext</span></a></span></span><span> </span><span id="local-6989586621680783846"><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680783846"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TextDetails -&gt; Int -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#textBeside_"><span class="hs-identifier hs-var">textBeside_</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FastString -&gt; TextDetails
</span><a href="GHC.Utils.Ppr.html#PStr"><span class="hs-identifier hs-var">PStr</span></a></span><span> </span><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680783846"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FastString -&gt; Int
</span><a href="GHC.Data.FastString.html#lengthFS"><span class="hs-identifier hs-var">lengthFS</span></a></span><span> </span><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680783846"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span>
</span><span id="line-314"></span><span>
</span><span id="line-315"></span><span class="annot"><a href="GHC.Utils.Ppr.html#ptext"><span class="hs-identifier hs-type">ptext</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Data.FastString.html#PtrString"><span class="hs-identifier hs-type">PtrString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span>
</span><span id="line-316"></span><span id="ptext"><span class="annot"><span class="annottext">ptext :: PtrString -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#ptext"><span class="hs-identifier hs-var hs-var">ptext</span></a></span></span><span> </span><span id="local-6989586621680783844"><span class="annot"><span class="annottext">PtrString
</span><a href="#local-6989586621680783844"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TextDetails -&gt; Int -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#textBeside_"><span class="hs-identifier hs-var">textBeside_</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PtrString -&gt; TextDetails
</span><a href="GHC.Utils.Ppr.html#LStr"><span class="hs-identifier hs-var">LStr</span></a></span><span> </span><span class="annot"><span class="annottext">PtrString
</span><a href="#local-6989586621680783844"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PtrString -&gt; Int
</span><a href="GHC.Data.FastString.html#lengthPS"><span class="hs-identifier hs-var">lengthPS</span></a></span><span> </span><span class="annot"><span class="annottext">PtrString
</span><a href="#local-6989586621680783844"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span>
</span><span id="line-317"></span><span>
</span><span id="line-318"></span><span class="annot"><a href="GHC.Utils.Ppr.html#ztext"><span class="hs-identifier hs-type">ztext</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Data.FastString.html#FastZString"><span class="hs-identifier hs-type">FastZString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span>
</span><span id="line-319"></span><span id="ztext"><span class="annot"><span class="annottext">ztext :: FastZString -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#ztext"><span class="hs-identifier hs-var hs-var">ztext</span></a></span></span><span> </span><span id="local-6989586621680783842"><span class="annot"><span class="annottext">FastZString
</span><a href="#local-6989586621680783842"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TextDetails -&gt; Int -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#textBeside_"><span class="hs-identifier hs-var">textBeside_</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FastZString -&gt; TextDetails
</span><a href="GHC.Utils.Ppr.html#ZStr"><span class="hs-identifier hs-var">ZStr</span></a></span><span> </span><span class="annot"><span class="annottext">FastZString
</span><a href="#local-6989586621680783842"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FastZString -&gt; Int
</span><a href="GHC.Data.FastString.html#lengthFZS"><span class="hs-identifier hs-var">lengthFZS</span></a></span><span> </span><span class="annot"><span class="annottext">FastZString
</span><a href="#local-6989586621680783842"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span>
</span><span id="line-320"></span><span>
</span><span id="line-321"></span><span class="hs-comment">-- | Some text with any width. (@text s = sizedText (length s) s@)</span><span>
</span><span id="line-322"></span><span class="annot"><a href="GHC.Utils.Ppr.html#sizedText"><span class="hs-identifier hs-type">sizedText</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span>
</span><span id="line-323"></span><span id="sizedText"><span class="annot"><span class="annottext">sizedText :: Int -&gt; String -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#sizedText"><span class="hs-identifier hs-var hs-var">sizedText</span></a></span></span><span> </span><span id="local-6989586621680783840"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783840"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span id="local-6989586621680783839"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680783839"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TextDetails -&gt; Int -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#textBeside_"><span class="hs-identifier hs-var">textBeside_</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; TextDetails
</span><a href="GHC.Utils.Ppr.html#Str"><span class="hs-identifier hs-var">Str</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680783839"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783840"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span>
</span><span id="line-324"></span><span>
</span><span id="line-325"></span><span class="hs-comment">-- | Some text, but without any width. Use for non-printing text</span><span>
</span><span id="line-326"></span><span class="hs-comment">-- such as a HTML or Latex tags</span><span>
</span><span id="line-327"></span><span class="annot"><a href="GHC.Utils.Ppr.html#zeroWidthText"><span class="hs-identifier hs-type">zeroWidthText</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span>
</span><span id="line-328"></span><span id="zeroWidthText"><span class="annot"><span class="annottext">zeroWidthText :: String -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#zeroWidthText"><span class="hs-identifier hs-var hs-var">zeroWidthText</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; String -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#sizedText"><span class="hs-identifier hs-var">sizedText</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-329"></span><span>
</span><span id="line-330"></span><span class="hs-comment">-- | The empty document, with no height and no width.</span><span>
</span><span id="line-331"></span><span class="hs-comment">-- 'empty' is the identity for '&lt;&gt;', '&lt;+&gt;', '$$' and '$+$', and anywhere</span><span>
</span><span id="line-332"></span><span class="hs-comment">-- in the argument list for 'sep', 'hcat', 'hsep', 'vcat', 'fcat' etc.</span><span>
</span><span id="line-333"></span><span class="annot"><a href="GHC.Utils.Ppr.html#empty"><span class="hs-identifier hs-type">empty</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span>
</span><span id="line-334"></span><span id="empty"><span class="annot"><span class="annottext">empty :: Doc
</span><a href="GHC.Utils.Ppr.html#empty"><span class="hs-identifier hs-var hs-var">empty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span>
</span><span id="line-335"></span><span>
</span><span id="line-336"></span><span class="hs-comment">-- | Returns 'True' if the document is empty</span><span>
</span><span id="line-337"></span><span class="annot"><a href="GHC.Utils.Ppr.html#isEmpty"><span class="hs-identifier hs-type">isEmpty</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-338"></span><span id="isEmpty"><span class="annot"><span class="annottext">isEmpty :: Doc -&gt; Bool
</span><a href="GHC.Utils.Ppr.html#isEmpty"><span class="hs-identifier hs-var hs-var">isEmpty</span></a></span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-339"></span><span class="annot"><a href="GHC.Utils.Ppr.html#isEmpty"><span class="hs-identifier hs-var">isEmpty</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><span class="hs-identifier">_</span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-340"></span><span>
</span><span id="line-341"></span><span class="hs-comment">{-
Q: What is the reason for negative indentation (i.e. argument to indent
   is &lt; 0) ?

A:
This indicates an error in the library client's code.
If we compose a &lt;&gt; b, and the first line of b is more indented than some
other lines of b, the law &lt;n6&gt; (&lt;&gt; eats nests) may cause the pretty
printer to produce an invalid layout:

doc       |0123345
------------------
d1        |a...|
d2        |...b|
          |c...|

d1&lt;&gt;d2    |ab..|
         c|....|

Consider a &lt;&gt; b, let `s' be the length of the last line of `a', `k' the
indentation of the first line of b, and `k0' the indentation of the
left-most line b_i of b.

The produced layout will have negative indentation if `k - k0 &gt; s', as
the first line of b will be put on the (s+1)th column, effectively
translating b horizontally by (k-s). Now if the i^th line of b has an
indentation k0 &lt; (k-s), it is translated out-of-page, causing
`negative indentation'.
-}</span><span>
</span><span id="line-370"></span><span>
</span><span id="line-371"></span><span>
</span><span id="line-372"></span><span class="annot"><a href="GHC.Utils.Ppr.html#semi"><span class="hs-identifier hs-type">semi</span></a></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-comment">-- ^ A ';' character</span><span>
</span><span id="line-373"></span><span class="annot"><a href="GHC.Utils.Ppr.html#comma"><span class="hs-identifier hs-type">comma</span></a></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-comment">-- ^ A ',' character</span><span>
</span><span id="line-374"></span><span class="annot"><a href="GHC.Utils.Ppr.html#colon"><span class="hs-identifier hs-type">colon</span></a></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-comment">-- ^ A ':' character</span><span>
</span><span id="line-375"></span><span class="annot"><a href="GHC.Utils.Ppr.html#space"><span class="hs-identifier hs-type">space</span></a></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-comment">-- ^ A space character</span><span>
</span><span id="line-376"></span><span class="annot"><a href="GHC.Utils.Ppr.html#equals"><span class="hs-identifier hs-type">equals</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-comment">-- ^ A '=' character</span><span>
</span><span id="line-377"></span><span class="annot"><a href="GHC.Utils.Ppr.html#lparen"><span class="hs-identifier hs-type">lparen</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-comment">-- ^ A '(' character</span><span>
</span><span id="line-378"></span><span class="annot"><a href="GHC.Utils.Ppr.html#rparen"><span class="hs-identifier hs-type">rparen</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-comment">-- ^ A ')' character</span><span>
</span><span id="line-379"></span><span class="annot"><a href="GHC.Utils.Ppr.html#lbrack"><span class="hs-identifier hs-type">lbrack</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-comment">-- ^ A '[' character</span><span>
</span><span id="line-380"></span><span class="annot"><a href="GHC.Utils.Ppr.html#rbrack"><span class="hs-identifier hs-type">rbrack</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-comment">-- ^ A ']' character</span><span>
</span><span id="line-381"></span><span class="annot"><a href="GHC.Utils.Ppr.html#lbrace"><span class="hs-identifier hs-type">lbrace</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-comment">-- ^ A '{' character</span><span>
</span><span id="line-382"></span><span class="annot"><a href="GHC.Utils.Ppr.html#rbrace"><span class="hs-identifier hs-type">rbrace</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-comment">-- ^ A '}' character</span><span>
</span><span id="line-383"></span><span id="semi"><span class="annot"><span class="annottext">semi :: Doc
</span><a href="GHC.Utils.Ppr.html#semi"><span class="hs-identifier hs-var hs-var">semi</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">';'</span></span><span>
</span><span id="line-384"></span><span id="comma"><span class="annot"><span class="annottext">comma :: Doc
</span><a href="GHC.Utils.Ppr.html#comma"><span class="hs-identifier hs-var hs-var">comma</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">','</span></span><span>
</span><span id="line-385"></span><span id="colon"><span class="annot"><span class="annottext">colon :: Doc
</span><a href="GHC.Utils.Ppr.html#colon"><span class="hs-identifier hs-var hs-var">colon</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">':'</span></span><span>
</span><span id="line-386"></span><span id="space"><span class="annot"><span class="annottext">space :: Doc
</span><a href="GHC.Utils.Ppr.html#space"><span class="hs-identifier hs-var hs-var">space</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">' '</span></span><span>
</span><span id="line-387"></span><span id="equals"><span class="annot"><span class="annottext">equals :: Doc
</span><a href="GHC.Utils.Ppr.html#equals"><span class="hs-identifier hs-var hs-var">equals</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'='</span></span><span>
</span><span id="line-388"></span><span id="lparen"><span class="annot"><span class="annottext">lparen :: Doc
</span><a href="GHC.Utils.Ppr.html#lparen"><span class="hs-identifier hs-var hs-var">lparen</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'('</span></span><span>
</span><span id="line-389"></span><span id="rparen"><span class="annot"><span class="annottext">rparen :: Doc
</span><a href="GHC.Utils.Ppr.html#rparen"><span class="hs-identifier hs-var hs-var">rparen</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">')'</span></span><span>
</span><span id="line-390"></span><span id="lbrack"><span class="annot"><span class="annottext">lbrack :: Doc
</span><a href="GHC.Utils.Ppr.html#lbrack"><span class="hs-identifier hs-var hs-var">lbrack</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'['</span></span><span>
</span><span id="line-391"></span><span id="rbrack"><span class="annot"><span class="annottext">rbrack :: Doc
</span><a href="GHC.Utils.Ppr.html#rbrack"><span class="hs-identifier hs-var hs-var">rbrack</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">']'</span></span><span>
</span><span id="line-392"></span><span id="lbrace"><span class="annot"><span class="annottext">lbrace :: Doc
</span><a href="GHC.Utils.Ppr.html#lbrace"><span class="hs-identifier hs-var hs-var">lbrace</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'{'</span></span><span>
</span><span id="line-393"></span><span id="rbrace"><span class="annot"><span class="annottext">rbrace :: Doc
</span><a href="GHC.Utils.Ppr.html#rbrace"><span class="hs-identifier hs-var hs-var">rbrace</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'}'</span></span><span>
</span><span id="line-394"></span><span>
</span><span id="line-395"></span><span class="annot"><a href="GHC.Utils.Ppr.html#spaceText"><span class="hs-identifier hs-type">spaceText</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#nlText"><span class="hs-identifier hs-type">nlText</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#TextDetails"><span class="hs-identifier hs-type">TextDetails</span></a></span><span>
</span><span id="line-396"></span><span id="spaceText"><span class="annot"><span class="annottext">spaceText :: TextDetails
</span><a href="GHC.Utils.Ppr.html#spaceText"><span class="hs-identifier hs-var hs-var">spaceText</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; TextDetails
</span><a href="GHC.Utils.Ppr.html#Chr"><span class="hs-identifier hs-var">Chr</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">' '</span></span><span>
</span><span id="line-397"></span><span id="nlText"><span class="annot"><span class="annottext">nlText :: TextDetails
</span><a href="GHC.Utils.Ppr.html#nlText"><span class="hs-identifier hs-var hs-var">nlText</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; TextDetails
</span><a href="GHC.Utils.Ppr.html#Chr"><span class="hs-identifier hs-var">Chr</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\n'</span></span><span>
</span><span id="line-398"></span><span>
</span><span id="line-399"></span><span class="annot"><a href="GHC.Utils.Ppr.html#int"><span class="hs-identifier hs-type">int</span></a></span><span>      </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-comment">-- ^ @int n = text (show n)@</span><span>
</span><span id="line-400"></span><span class="annot"><a href="GHC.Utils.Ppr.html#integer"><span class="hs-identifier hs-type">integer</span></a></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Integer</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-comment">-- ^ @integer n = text (show n)@</span><span>
</span><span id="line-401"></span><span class="annot"><a href="GHC.Utils.Ppr.html#float"><span class="hs-identifier hs-type">float</span></a></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Float</span></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-comment">-- ^ @float n = text (show n)@</span><span>
</span><span id="line-402"></span><span class="annot"><a href="GHC.Utils.Ppr.html#double"><span class="hs-identifier hs-type">double</span></a></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Double</span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-comment">-- ^ @double n = text (show n)@</span><span>
</span><span id="line-403"></span><span class="annot"><a href="GHC.Utils.Ppr.html#rational"><span class="hs-identifier hs-type">rational</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Real.html#Rational"><span class="hs-identifier hs-type">Rational</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-comment">-- ^ @rational n = text (show n)@</span><span>
</span><span id="line-404"></span><span class="annot"><a href="GHC.Utils.Ppr.html#hex"><span class="hs-identifier hs-type">hex</span></a></span><span>      </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Integer</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-comment">-- ^ See Note [Print Hexadecimal Literals]</span><span>
</span><span id="line-405"></span><span id="int"><span class="annot"><span class="annottext">int :: Int -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#int"><span class="hs-identifier hs-var hs-var">int</span></a></span></span><span>      </span><span id="local-6989586621680783836"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783836"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783836"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-406"></span><span id="integer"><span class="annot"><span class="annottext">integer :: Integer -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#integer"><span class="hs-identifier hs-var hs-var">integer</span></a></span></span><span>  </span><span id="local-6989586621680783834"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621680783834"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621680783834"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-407"></span><span id="float"><span class="annot"><span class="annottext">float :: Float -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#float"><span class="hs-identifier hs-var hs-var">float</span></a></span></span><span>    </span><span id="local-6989586621680783833"><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621680783833"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Float -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621680783833"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-408"></span><span id="double"><span class="annot"><span class="annottext">double :: Double -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#double"><span class="hs-identifier hs-var hs-var">double</span></a></span></span><span>   </span><span id="local-6989586621680783832"><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621680783832"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Double -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621680783832"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-409"></span><span id="rational"><span class="annot"><span class="annottext">rational :: Rational -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#rational"><span class="hs-identifier hs-var hs-var">rational</span></a></span></span><span> </span><span id="local-6989586621680783831"><span class="annot"><span class="annottext">Rational
</span><a href="#local-6989586621680783831"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Rational -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">Rational
</span><a href="#local-6989586621680783831"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-410"></span><span id="hex"><span class="annot"><span class="annottext">hex :: Integer -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#hex"><span class="hs-identifier hs-var hs-var">hex</span></a></span></span><span>      </span><span id="local-6989586621680783830"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621680783830"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'0'</span></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ShowS
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'x'</span></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ShowS
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680783829"><span class="hs-identifier hs-var">padded</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-411"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-412"></span><span>    </span><span id="local-6989586621680783825"><span class="annot"><span class="annottext">str :: String
</span><a href="#local-6989586621680783825"><span class="hs-identifier hs-var hs-var">str</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; ShowS
forall a. (Integral a, Show a) =&gt; a -&gt; ShowS
</span><a href="../../base/src/Numeric.html#showHex"><span class="hs-identifier hs-var">showHex</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621680783830"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span>
</span><span id="line-413"></span><span>    </span><span id="local-6989586621680783821"><span class="annot"><span class="annottext">strLen :: Int
</span><a href="#local-6989586621680783821"><span class="hs-identifier hs-var hs-var">strLen</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Ord a =&gt; a -&gt; a -&gt; a
</span><span class="hs-identifier hs-var">max</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; Int
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Int
</span><a href="../../base/src/Data.Foldable.html#length"><span class="hs-identifier hs-var">length</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680783825"><span class="hs-identifier hs-var">str</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-414"></span><span>    </span><span id="local-6989586621680783806"><span class="annot"><span class="annottext">len :: Int
</span><a href="#local-6989586621680783806"><span class="hs-identifier hs-var hs-var">len</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a b. (Num a, Integral b) =&gt; a -&gt; b -&gt; a
</span><a href="../../base/src/GHC.Real.html#%5E"><span class="hs-operator hs-var">^</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Double -&gt; Int
forall a b. (RealFrac a, Integral b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#ceiling"><span class="hs-identifier hs-var">ceiling</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Double -&gt; Double -&gt; Double
forall a. Floating a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Float.html#logBase"><span class="hs-identifier hs-var">logBase</span></a></span><span> </span><span class="annot"><span class="annottext">Double
</span><span class="hs-number">2</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Double
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783821"><span class="hs-identifier hs-var">strLen</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Double</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">)</span><span>
</span><span id="line-415"></span><span>    </span><span id="local-6989586621680783829"><span class="annot"><span class="annottext">padded :: String
</span><a href="#local-6989586621680783829"><span class="hs-identifier hs-var hs-var">padded</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Char -&gt; String
forall a. Int -&gt; a -&gt; [a]
</span><a href="../../base/src/GHC.List.html#replicate"><span class="hs-identifier hs-var">replicate</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783806"><span class="hs-identifier hs-var">len</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783821"><span class="hs-identifier hs-var">strLen</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'0'</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680783825"><span class="hs-identifier hs-var">str</span></a></span><span>
</span><span id="line-416"></span><span>
</span><span id="line-417"></span><span class="annot"><a href="GHC.Utils.Ppr.html#parens"><span class="hs-identifier hs-type">parens</span></a></span><span>       </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-comment">-- ^ Wrap document in @(...)@</span><span>
</span><span id="line-418"></span><span class="annot"><a href="GHC.Utils.Ppr.html#brackets"><span class="hs-identifier hs-type">brackets</span></a></span><span>     </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-comment">-- ^ Wrap document in @[...]@</span><span>
</span><span id="line-419"></span><span class="annot"><a href="GHC.Utils.Ppr.html#braces"><span class="hs-identifier hs-type">braces</span></a></span><span>       </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-comment">-- ^ Wrap document in @{...}@</span><span>
</span><span id="line-420"></span><span class="annot"><a href="GHC.Utils.Ppr.html#quotes"><span class="hs-identifier hs-type">quotes</span></a></span><span>       </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-comment">-- ^ Wrap document in @\'...\'@</span><span>
</span><span id="line-421"></span><span class="annot"><a href="GHC.Utils.Ppr.html#quote"><span class="hs-identifier hs-type">quote</span></a></span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span>
</span><span id="line-422"></span><span class="annot"><a href="GHC.Utils.Ppr.html#doubleQuotes"><span class="hs-identifier hs-type">doubleQuotes</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-comment">-- ^ Wrap document in @\&quot;...\&quot;@</span><span>
</span><span id="line-423"></span><span id="quotes"><span class="annot"><span class="annottext">quotes :: Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#quotes"><span class="hs-identifier hs-var hs-var">quotes</span></a></span></span><span> </span><span id="local-6989586621680783800"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783800"><span class="hs-identifier hs-var">p</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'`'</span></span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783800"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\''</span></span><span>
</span><span id="line-424"></span><span id="quote"><span class="annot"><span class="annottext">quote :: Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#quote"><span class="hs-identifier hs-var hs-var">quote</span></a></span></span><span> </span><span id="local-6989586621680783799"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783799"><span class="hs-identifier hs-var">p</span></a></span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\''</span></span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783799"><span class="hs-identifier hs-var">p</span></a></span><span>
</span><span id="line-425"></span><span id="doubleQuotes"><span class="annot"><span class="annottext">doubleQuotes :: Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#doubleQuotes"><span class="hs-identifier hs-var hs-var">doubleQuotes</span></a></span></span><span> </span><span id="local-6989586621680783798"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783798"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'&quot;'</span></span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783798"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'&quot;'</span></span><span>
</span><span id="line-426"></span><span id="parens"><span class="annot"><span class="annottext">parens :: Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#parens"><span class="hs-identifier hs-var hs-var">parens</span></a></span></span><span> </span><span id="local-6989586621680783797"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783797"><span class="hs-identifier hs-var">p</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'('</span></span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783797"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">')'</span></span><span>
</span><span id="line-427"></span><span id="brackets"><span class="annot"><span class="annottext">brackets :: Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#brackets"><span class="hs-identifier hs-var hs-var">brackets</span></a></span></span><span> </span><span id="local-6989586621680783796"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783796"><span class="hs-identifier hs-var">p</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'['</span></span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783796"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">']'</span></span><span>
</span><span id="line-428"></span><span id="braces"><span class="annot"><span class="annottext">braces :: Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#braces"><span class="hs-identifier hs-var hs-var">braces</span></a></span></span><span> </span><span id="local-6989586621680783795"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783795"><span class="hs-identifier hs-var">p</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'{'</span></span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783795"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'}'</span></span><span>
</span><span id="line-429"></span><span>
</span><span id="line-430"></span><span class="hs-comment">{-
Note [Print Hexadecimal Literals]

Relevant discussions:
 * Phabricator: https://phabricator.haskell.org/D4465
 * GHC Trac: https://gitlab.haskell.org/ghc/ghc/issues/14872

There is a flag `-dword-hex-literals` that causes literals of
type `Word#` or `Word64#` to be displayed in hexadecimal instead
of decimal when dumping GHC core. It also affects the presentation
of these in GHC's error messages. Additionally, the hexadecimal
encoding of these numbers is zero-padded so that its length is
a power of two. As an example of what this does,
consider the following haskell file `Literals.hs`:

    module Literals where

    alpha :: Int
    alpha = 100 + 200

    beta :: Word -&gt; Word
    beta x = x + div maxBound 255 + div 0xFFFFFFFF 255 + 0x0202

We get the following dumped core when we compile on a 64-bit
machine with ghc -O2 -fforce-recomp -ddump-simpl -dsuppress-all
-dhex-word-literals literals.hs:

    ==================== Tidy Core ====================

    ... omitted for brevity ...

    -- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
    alpha
    alpha = I# 300#

    -- RHS size: {terms: 12, types: 3, coercions: 0, joins: 0/0}
    beta
    beta
      = \ x_aYE -&gt;
          case x_aYE of { W# x#_a1v0 -&gt;
          W#
            (plusWord#
               (plusWord# (plusWord# x#_a1v0 0x0101010101010101##) 0x01010101##)
               0x0202##)
          }

Notice that the word literals are in hexadecimals and that they have
been padded with zeroes so that their lengths are 16, 8, and 4, respectively.

-}</span><span>
</span><span id="line-480"></span><span>
</span><span id="line-481"></span><span class="hs-comment">-- | Apply 'parens' to 'Doc' if boolean is true.</span><span>
</span><span id="line-482"></span><span class="annot"><a href="GHC.Utils.Ppr.html#maybeParens"><span class="hs-identifier hs-type">maybeParens</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span>
</span><span id="line-483"></span><span id="maybeParens"><span class="annot"><span class="annottext">maybeParens :: Bool -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#maybeParens"><span class="hs-identifier hs-var hs-var">maybeParens</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc
forall a. a -&gt; a
</span><a href="../../base/src/GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-484"></span><span class="annot"><a href="GHC.Utils.Ppr.html#maybeParens"><span class="hs-identifier hs-var">maybeParens</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#parens"><span class="hs-identifier hs-var">parens</span></a></span><span>
</span><span id="line-485"></span><span>
</span><span id="line-486"></span><span class="hs-comment">-- ---------------------------------------------------------------------------</span><span>
</span><span id="line-487"></span><span class="hs-comment">-- Structural operations on GDocs</span><span>
</span><span id="line-488"></span><span>
</span><span id="line-489"></span><span class="hs-comment">-- | Perform some simplification of a built up @GDoc@.</span><span>
</span><span id="line-490"></span><span class="annot"><a href="GHC.Utils.Ppr.html#reduceDoc"><span class="hs-identifier hs-type">reduceDoc</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#RDoc"><span class="hs-identifier hs-type">RDoc</span></a></span><span>
</span><span id="line-491"></span><span id="reduceDoc"><span class="annot"><span class="annottext">reduceDoc :: Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#reduceDoc"><span class="hs-identifier hs-var hs-var">reduceDoc</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Beside"><span class="hs-identifier hs-type">Beside</span></a></span><span> </span><span id="local-6989586621680783792"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783792"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621680783791"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783791"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span id="local-6989586621680783790"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783790"><span class="hs-identifier hs-var">q</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783792"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc -&gt; Doc
</span><span class="hs-operator hs-var">`seq`</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783791"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Doc -&gt; Doc
</span><span class="hs-operator hs-var">`seq`</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Doc -&gt; Bool -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#beside"><span class="hs-identifier hs-var">beside</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783792"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783791"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">(Doc -&gt; Doc) -&gt; Doc -&gt; Doc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24%21"><span class="hs-operator hs-var">$!</span></a></span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#reduceDoc"><span class="hs-identifier hs-var">reduceDoc</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783790"><span class="hs-identifier hs-var">q</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-492"></span><span class="annot"><a href="GHC.Utils.Ppr.html#reduceDoc"><span class="hs-identifier hs-var">reduceDoc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Above"><span class="hs-identifier hs-type">Above</span></a></span><span>  </span><span id="local-6989586621680783787"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783787"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621680783786"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783786"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span id="local-6989586621680783785"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783785"><span class="hs-identifier hs-var">q</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783787"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc -&gt; Doc
</span><span class="hs-operator hs-var">`seq`</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783786"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Doc -&gt; Doc
</span><span class="hs-operator hs-var">`seq`</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Doc -&gt; Bool -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#above"><span class="hs-identifier hs-var">above</span></a></span><span>  </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783787"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783786"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">(Doc -&gt; Doc) -&gt; Doc -&gt; Doc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24%21"><span class="hs-operator hs-var">$!</span></a></span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#reduceDoc"><span class="hs-identifier hs-var">reduceDoc</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783785"><span class="hs-identifier hs-var">q</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-493"></span><span class="annot"><a href="GHC.Utils.Ppr.html#reduceDoc"><span class="hs-identifier hs-var">reduceDoc</span></a></span><span> </span><span id="local-6989586621680783783"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783783"><span class="hs-identifier hs-var">p</span></a></span></span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783783"><span class="hs-identifier hs-var">p</span></a></span><span>
</span><span id="line-494"></span><span>
</span><span id="line-495"></span><span class="hs-comment">-- | List version of '&lt;&gt;'.</span><span>
</span><span id="line-496"></span><span class="annot"><a href="GHC.Utils.Ppr.html#hcat"><span class="hs-identifier hs-type">hcat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span>
</span><span id="line-497"></span><span id="hcat"><span class="annot"><span class="annottext">hcat :: [Doc] -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#hcat"><span class="hs-identifier hs-var hs-var">hcat</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#reduceAB"><span class="hs-identifier hs-var">reduceAB</span></a></span><span> </span><span class="annot"><span class="annottext">(Doc -&gt; Doc) -&gt; ([Doc] -&gt; Doc) -&gt; [Doc] -&gt; Doc
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(Doc -&gt; Doc -&gt; Doc) -&gt; Doc -&gt; [Doc] -&gt; Doc
forall (t :: * -&gt; *) a b.
Foldable t =&gt;
(a -&gt; b -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldr"><span class="hs-identifier hs-var">foldr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; Doc -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#beside_%27"><span class="hs-identifier hs-var">beside_'</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#empty"><span class="hs-identifier hs-var">empty</span></a></span><span>
</span><span id="line-498"></span><span>
</span><span id="line-499"></span><span class="hs-comment">-- | List version of '&lt;+&gt;'.</span><span>
</span><span id="line-500"></span><span class="annot"><a href="GHC.Utils.Ppr.html#hsep"><span class="hs-identifier hs-type">hsep</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span>
</span><span id="line-501"></span><span id="hsep"><span class="annot"><span class="annottext">hsep :: [Doc] -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#hsep"><span class="hs-identifier hs-var hs-var">hsep</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#reduceAB"><span class="hs-identifier hs-var">reduceAB</span></a></span><span> </span><span class="annot"><span class="annottext">(Doc -&gt; Doc) -&gt; ([Doc] -&gt; Doc) -&gt; [Doc] -&gt; Doc
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(Doc -&gt; Doc -&gt; Doc) -&gt; Doc -&gt; [Doc] -&gt; Doc
forall (t :: * -&gt; *) a b.
Foldable t =&gt;
(a -&gt; b -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldr"><span class="hs-identifier hs-var">foldr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; Doc -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#beside_%27"><span class="hs-identifier hs-var">beside_'</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span class="hs-special">)</span><span>  </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#empty"><span class="hs-identifier hs-var">empty</span></a></span><span>
</span><span id="line-502"></span><span>
</span><span id="line-503"></span><span class="hs-comment">-- | List version of '$$'.</span><span>
</span><span id="line-504"></span><span class="annot"><a href="GHC.Utils.Ppr.html#vcat"><span class="hs-identifier hs-type">vcat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span>
</span><span id="line-505"></span><span id="vcat"><span class="annot"><span class="annottext">vcat :: [Doc] -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#vcat"><span class="hs-identifier hs-var hs-var">vcat</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#reduceAB"><span class="hs-identifier hs-var">reduceAB</span></a></span><span> </span><span class="annot"><span class="annottext">(Doc -&gt; Doc) -&gt; ([Doc] -&gt; Doc) -&gt; [Doc] -&gt; Doc
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(Doc -&gt; Doc -&gt; Doc) -&gt; Doc -&gt; [Doc] -&gt; Doc
forall (t :: * -&gt; *) a b.
Foldable t =&gt;
(a -&gt; b -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldr"><span class="hs-identifier hs-var">foldr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; Doc -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#above_%27"><span class="hs-identifier hs-var">above_'</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#empty"><span class="hs-identifier hs-var">empty</span></a></span><span>
</span><span id="line-506"></span><span>
</span><span id="line-507"></span><span class="hs-comment">-- | Nest (or indent) a document by a given number of positions</span><span>
</span><span id="line-508"></span><span class="hs-comment">-- (which may also be negative).  'nest' satisfies the laws:</span><span>
</span><span id="line-509"></span><span class="hs-comment">--</span><span>
</span><span id="line-510"></span><span class="hs-comment">-- * @'nest' 0 x = x@</span><span>
</span><span id="line-511"></span><span class="hs-comment">--</span><span>
</span><span id="line-512"></span><span class="hs-comment">-- * @'nest' k ('nest' k' x) = 'nest' (k+k') x@</span><span>
</span><span id="line-513"></span><span class="hs-comment">--</span><span>
</span><span id="line-514"></span><span class="hs-comment">-- * @'nest' k (x '&lt;&gt;' y) = 'nest' k z '&lt;&gt;' 'nest' k y@</span><span>
</span><span id="line-515"></span><span class="hs-comment">--</span><span>
</span><span id="line-516"></span><span class="hs-comment">-- * @'nest' k (x '$$' y) = 'nest' k x '$$' 'nest' k y@</span><span>
</span><span id="line-517"></span><span class="hs-comment">--</span><span>
</span><span id="line-518"></span><span class="hs-comment">-- * @'nest' k 'empty' = 'empty'@</span><span>
</span><span id="line-519"></span><span class="hs-comment">--</span><span>
</span><span id="line-520"></span><span class="hs-comment">-- * @x '&lt;&gt;' 'nest' k y = x '&lt;&gt;' y@, if @x@ non-empty</span><span>
</span><span id="line-521"></span><span class="hs-comment">--</span><span>
</span><span id="line-522"></span><span class="hs-comment">-- The side condition on the last law is needed because</span><span>
</span><span id="line-523"></span><span class="hs-comment">-- 'empty' is a left identity for '&lt;&gt;'.</span><span>
</span><span id="line-524"></span><span class="annot"><a href="GHC.Utils.Ppr.html#nest"><span class="hs-identifier hs-type">nest</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span>
</span><span id="line-525"></span><span id="nest"><span class="annot"><span class="annottext">nest :: Int -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#nest"><span class="hs-identifier hs-var hs-var">nest</span></a></span></span><span> </span><span id="local-6989586621680783777"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783777"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621680783776"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783776"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#mkNest"><span class="hs-identifier hs-var">mkNest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783777"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#reduceDoc"><span class="hs-identifier hs-var">reduceDoc</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783776"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-526"></span><span>
</span><span id="line-527"></span><span class="hs-comment">-- | @hang d1 n d2 = sep [d1, nest n d2]@</span><span>
</span><span id="line-528"></span><span class="annot"><a href="GHC.Utils.Ppr.html#hang"><span class="hs-identifier hs-type">hang</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span>
</span><span id="line-529"></span><span id="hang"><span class="annot"><span class="annottext">hang :: Doc -&gt; Int -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#hang"><span class="hs-identifier hs-var hs-var">hang</span></a></span></span><span> </span><span id="local-6989586621680783774"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783774"><span class="hs-identifier hs-var">d1</span></a></span></span><span> </span><span id="local-6989586621680783773"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783773"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621680783772"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783772"><span class="hs-identifier hs-var">d2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Doc] -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#sep"><span class="hs-identifier hs-var">sep</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783774"><span class="hs-identifier hs-var">d1</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#nest"><span class="hs-identifier hs-var">nest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783773"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783772"><span class="hs-identifier hs-var">d2</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-530"></span><span>
</span><span id="line-531"></span><span class="hs-comment">-- | Apply 'hang' to the arguments if the first 'Doc' is not empty.</span><span>
</span><span id="line-532"></span><span class="annot"><a href="GHC.Utils.Ppr.html#hangNotEmpty"><span class="hs-identifier hs-type">hangNotEmpty</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span>
</span><span id="line-533"></span><span id="hangNotEmpty"><span class="annot"><span class="annottext">hangNotEmpty :: Doc -&gt; Int -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#hangNotEmpty"><span class="hs-identifier hs-var hs-var">hangNotEmpty</span></a></span></span><span> </span><span id="local-6989586621680783771"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783771"><span class="hs-identifier hs-var">d1</span></a></span></span><span> </span><span id="local-6989586621680783770"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783770"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621680783769"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783769"><span class="hs-identifier hs-var">d2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Bool
</span><a href="GHC.Utils.Ppr.html#isEmpty"><span class="hs-identifier hs-var">isEmpty</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783771"><span class="hs-identifier hs-var">d1</span></a></span><span>
</span><span id="line-534"></span><span>                       </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783769"><span class="hs-identifier hs-var">d2</span></a></span><span>
</span><span id="line-535"></span><span>                       </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Int -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#hang"><span class="hs-identifier hs-var">hang</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783771"><span class="hs-identifier hs-var">d1</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783770"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783769"><span class="hs-identifier hs-var">d2</span></a></span><span>
</span><span id="line-536"></span><span>
</span><span id="line-537"></span><span class="hs-comment">-- | @punctuate p [d1, ... dn] = [d1 \&lt;&gt; p, d2 \&lt;&gt; p, ... dn-1 \&lt;&gt; p, dn]@</span><span>
</span><span id="line-538"></span><span class="annot"><a href="GHC.Utils.Ppr.html#punctuate"><span class="hs-identifier hs-type">punctuate</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-539"></span><span id="punctuate"><span class="annot"><span class="annottext">punctuate :: Doc -&gt; [Doc] -&gt; [Doc]
</span><a href="GHC.Utils.Ppr.html#punctuate"><span class="hs-identifier hs-var hs-var">punctuate</span></a></span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-540"></span><span class="annot"><a href="GHC.Utils.Ppr.html#punctuate"><span class="hs-identifier hs-var">punctuate</span></a></span><span> </span><span id="local-6989586621680783768"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783768"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680783767"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783767"><span class="hs-identifier hs-var">x</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621680783766"><span class="annot"><span class="annottext">[Doc]
</span><a href="#local-6989586621680783766"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc -&gt; [Doc] -&gt; [Doc]
</span><a href="#local-6989586621680783765"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783767"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">[Doc]
</span><a href="#local-6989586621680783766"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-541"></span><span>                   </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621680783765"><span class="annot"><span class="annottext">go :: Doc -&gt; [Doc] -&gt; [Doc]
</span><a href="#local-6989586621680783765"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621680783764"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783764"><span class="hs-identifier hs-var">y</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783764"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-542"></span><span>                         </span><span class="annot"><a href="#local-6989586621680783765"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span id="local-6989586621680783763"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783763"><span class="hs-identifier hs-var">y</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680783762"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783762"><span class="hs-identifier hs-var">z</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621680783761"><span class="annot"><span class="annottext">[Doc]
</span><a href="#local-6989586621680783761"><span class="hs-identifier hs-var">zs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783763"><span class="hs-identifier hs-var">y</span></a></span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783768"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Doc -&gt; [Doc] -&gt; [Doc]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">Doc -&gt; [Doc] -&gt; [Doc]
</span><a href="#local-6989586621680783765"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783762"><span class="hs-identifier hs-var">z</span></a></span><span> </span><span class="annot"><span class="annottext">[Doc]
</span><a href="#local-6989586621680783761"><span class="hs-identifier hs-var">zs</span></a></span><span>
</span><span id="line-543"></span><span>
</span><span id="line-544"></span><span class="hs-comment">-- mkNest checks for Nest's invariant that it doesn't have an Empty inside it</span><span>
</span><span id="line-545"></span><span class="annot"><a href="GHC.Utils.Ppr.html#mkNest"><span class="hs-identifier hs-type">mkNest</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span>
</span><span id="line-546"></span><span id="mkNest"><span class="annot"><span class="annottext">mkNest :: Int -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#mkNest"><span class="hs-identifier hs-var hs-var">mkNest</span></a></span></span><span> </span><span id="local-6989586621680783760"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783760"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783760"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">`seq`</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc
forall a. HasCallStack =&gt; a
</span><a href="../../base/src/GHC.Err.html#undefined"><span class="hs-identifier hs-var">undefined</span></a></span><span>
</span><span id="line-547"></span><span class="annot"><a href="GHC.Utils.Ppr.html#mkNest"><span class="hs-identifier hs-var">mkNest</span></a></span><span> </span><span id="local-6989586621680783758"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783758"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Nest"><span class="hs-identifier hs-type">Nest</span></a></span><span> </span><span id="local-6989586621680783757"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783757"><span class="hs-identifier hs-var">k1</span></a></span></span><span> </span><span id="local-6989586621680783756"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783756"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">)</span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#mkNest"><span class="hs-identifier hs-var">mkNest</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783758"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783757"><span class="hs-identifier hs-var">k1</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783756"><span class="hs-identifier hs-var">p</span></a></span><span>
</span><span id="line-548"></span><span class="annot"><a href="GHC.Utils.Ppr.html#mkNest"><span class="hs-identifier hs-var">mkNest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#NoDoc"><span class="hs-identifier hs-var">NoDoc</span></a></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#NoDoc"><span class="hs-identifier hs-var">NoDoc</span></a></span><span>
</span><span id="line-549"></span><span class="annot"><a href="GHC.Utils.Ppr.html#mkNest"><span class="hs-identifier hs-var">mkNest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span>
</span><span id="line-550"></span><span class="annot"><a href="GHC.Utils.Ppr.html#mkNest"><span class="hs-identifier hs-var">mkNest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span id="local-6989586621680783754"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783754"><span class="hs-identifier hs-var">p</span></a></span></span><span>                 </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783754"><span class="hs-identifier hs-var">p</span></a></span><span>
</span><span id="line-551"></span><span class="annot"><a href="GHC.Utils.Ppr.html#mkNest"><span class="hs-identifier hs-var">mkNest</span></a></span><span> </span><span id="local-6989586621680783753"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783753"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621680783752"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783752"><span class="hs-identifier hs-var">p</span></a></span></span><span>                 </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#nest_"><span class="hs-identifier hs-var">nest_</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783753"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783752"><span class="hs-identifier hs-var">p</span></a></span><span>
</span><span id="line-552"></span><span>
</span><span id="line-553"></span><span class="hs-comment">-- mkUnion checks for an empty document</span><span>
</span><span id="line-554"></span><span class="annot"><a href="GHC.Utils.Ppr.html#mkUnion"><span class="hs-identifier hs-type">mkUnion</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span>
</span><span id="line-555"></span><span id="mkUnion"><span class="annot"><span class="annottext">mkUnion :: Doc -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#mkUnion"><span class="hs-identifier hs-var hs-var">mkUnion</span></a></span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span>
</span><span id="line-556"></span><span class="annot"><a href="GHC.Utils.Ppr.html#mkUnion"><span class="hs-identifier hs-var">mkUnion</span></a></span><span> </span><span id="local-6989586621680783749"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783749"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621680783748"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783748"><span class="hs-identifier hs-var">q</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783749"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#union_"><span class="hs-operator hs-var">`union_`</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783748"><span class="hs-identifier hs-var">q</span></a></span><span>
</span><span id="line-557"></span><span>
</span><span id="line-558"></span><span class="annot"><a href="GHC.Utils.Ppr.html#beside_%27"><span class="hs-identifier hs-type">beside_'</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span>
</span><span id="line-559"></span><span id="beside_%27"><span class="annot"><span class="annottext">beside_' :: Bool -&gt; Doc -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#beside_%27"><span class="hs-identifier hs-var hs-var">beside_'</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680783746"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783746"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783746"><span class="hs-identifier hs-var">p</span></a></span><span>
</span><span id="line-560"></span><span class="annot"><a href="GHC.Utils.Ppr.html#beside_%27"><span class="hs-identifier hs-var">beside_'</span></a></span><span> </span><span id="local-6989586621680783745"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783745"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span id="local-6989586621680783744"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783744"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621680783743"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783743"><span class="hs-identifier hs-var">q</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Bool -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#Beside"><span class="hs-identifier hs-var">Beside</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783744"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783745"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783743"><span class="hs-identifier hs-var">q</span></a></span><span>
</span><span id="line-561"></span><span>
</span><span id="line-562"></span><span class="annot"><a href="GHC.Utils.Ppr.html#above_%27"><span class="hs-identifier hs-type">above_'</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span>
</span><span id="line-563"></span><span id="above_%27"><span class="annot"><span class="annottext">above_' :: Bool -&gt; Doc -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#above_%27"><span class="hs-identifier hs-var hs-var">above_'</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680783742"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783742"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783742"><span class="hs-identifier hs-var">p</span></a></span><span>
</span><span id="line-564"></span><span class="annot"><a href="GHC.Utils.Ppr.html#above_%27"><span class="hs-identifier hs-var">above_'</span></a></span><span> </span><span id="local-6989586621680783741"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783741"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span id="local-6989586621680783740"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783740"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621680783739"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783739"><span class="hs-identifier hs-var">q</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Bool -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#Above"><span class="hs-identifier hs-var">Above</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783740"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783741"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783739"><span class="hs-identifier hs-var">q</span></a></span><span>
</span><span id="line-565"></span><span>
</span><span id="line-566"></span><span class="annot"><a href="GHC.Utils.Ppr.html#reduceAB"><span class="hs-identifier hs-type">reduceAB</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span>
</span><span id="line-567"></span><span id="reduceAB"><span class="annot"><span class="annottext">reduceAB :: Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#reduceAB"><span class="hs-identifier hs-var hs-var">reduceAB</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Above"><span class="hs-identifier hs-type">Above</span></a></span><span>  </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680783738"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783738"><span class="hs-identifier hs-var">q</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783738"><span class="hs-identifier hs-var">q</span></a></span><span>
</span><span id="line-568"></span><span class="annot"><a href="GHC.Utils.Ppr.html#reduceAB"><span class="hs-identifier hs-var">reduceAB</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Beside"><span class="hs-identifier hs-type">Beside</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680783737"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783737"><span class="hs-identifier hs-var">q</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783737"><span class="hs-identifier hs-var">q</span></a></span><span>
</span><span id="line-569"></span><span class="annot"><a href="GHC.Utils.Ppr.html#reduceAB"><span class="hs-identifier hs-var">reduceAB</span></a></span><span> </span><span id="local-6989586621680783736"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783736"><span class="hs-identifier hs-var">doc</span></a></span></span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783736"><span class="hs-identifier hs-var">doc</span></a></span><span>
</span><span id="line-570"></span><span>
</span><span id="line-571"></span><span class="annot"><a href="GHC.Utils.Ppr.html#nilAbove_"><span class="hs-identifier hs-type">nilAbove_</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#RDoc"><span class="hs-identifier hs-type">RDoc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#RDoc"><span class="hs-identifier hs-type">RDoc</span></a></span><span>
</span><span id="line-572"></span><span id="nilAbove_"><span class="annot"><span class="annottext">nilAbove_ :: Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#nilAbove_"><span class="hs-identifier hs-var hs-var">nilAbove_</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#NilAbove"><span class="hs-identifier hs-var">NilAbove</span></a></span><span>
</span><span id="line-573"></span><span>
</span><span id="line-574"></span><span class="hs-comment">-- Arg of a TextBeside is always an RDoc</span><span>
</span><span id="line-575"></span><span class="annot"><a href="GHC.Utils.Ppr.html#textBeside_"><span class="hs-identifier hs-type">textBeside_</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#TextDetails"><span class="hs-identifier hs-type">TextDetails</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#RDoc"><span class="hs-identifier hs-type">RDoc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#RDoc"><span class="hs-identifier hs-type">RDoc</span></a></span><span>
</span><span id="line-576"></span><span id="textBeside_"><span class="annot"><span class="annottext">textBeside_ :: TextDetails -&gt; Int -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#textBeside_"><span class="hs-identifier hs-var hs-var">textBeside_</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TextDetails -&gt; Int -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#TextBeside"><span class="hs-identifier hs-var">TextBeside</span></a></span><span>
</span><span id="line-577"></span><span>
</span><span id="line-578"></span><span class="annot"><a href="GHC.Utils.Ppr.html#nest_"><span class="hs-identifier hs-type">nest_</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#RDoc"><span class="hs-identifier hs-type">RDoc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#RDoc"><span class="hs-identifier hs-type">RDoc</span></a></span><span>
</span><span id="line-579"></span><span id="nest_"><span class="annot"><span class="annottext">nest_ :: Int -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#nest_"><span class="hs-identifier hs-var hs-var">nest_</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#Nest"><span class="hs-identifier hs-var">Nest</span></a></span><span>
</span><span id="line-580"></span><span>
</span><span id="line-581"></span><span class="annot"><a href="GHC.Utils.Ppr.html#union_"><span class="hs-identifier hs-type">union_</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#RDoc"><span class="hs-identifier hs-type">RDoc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#RDoc"><span class="hs-identifier hs-type">RDoc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#RDoc"><span class="hs-identifier hs-type">RDoc</span></a></span><span>
</span><span id="line-582"></span><span id="union_"><span class="annot"><span class="annottext">union_ :: Doc -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#union_"><span class="hs-identifier hs-var hs-var">union_</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#Union"><span class="hs-identifier hs-var">Union</span></a></span><span>
</span><span id="line-583"></span><span>
</span><span id="line-584"></span><span>
</span><span id="line-585"></span><span class="hs-comment">-- ---------------------------------------------------------------------------</span><span>
</span><span id="line-586"></span><span class="hs-comment">-- Vertical composition @$$@</span><span>
</span><span id="line-587"></span><span>
</span><span id="line-588"></span><span class="hs-comment">-- | Above, except that if the last line of the first argument stops</span><span>
</span><span id="line-589"></span><span class="hs-comment">-- at least one position before the first line of the second begins,</span><span>
</span><span id="line-590"></span><span class="hs-comment">-- these two lines are overlapped.  For example:</span><span>
</span><span id="line-591"></span><span class="hs-comment">--</span><span>
</span><span id="line-592"></span><span class="hs-comment">-- &gt;    text &quot;hi&quot; $$ nest 5 (text &quot;there&quot;)</span><span>
</span><span id="line-593"></span><span class="hs-comment">--</span><span>
</span><span id="line-594"></span><span class="hs-comment">-- lays out as</span><span>
</span><span id="line-595"></span><span class="hs-comment">--</span><span>
</span><span id="line-596"></span><span class="hs-comment">-- &gt;    hi   there</span><span>
</span><span id="line-597"></span><span class="hs-comment">--</span><span>
</span><span id="line-598"></span><span class="hs-comment">-- rather than</span><span>
</span><span id="line-599"></span><span class="hs-comment">--</span><span>
</span><span id="line-600"></span><span class="hs-comment">-- &gt;    hi</span><span>
</span><span id="line-601"></span><span class="hs-comment">-- &gt;         there</span><span>
</span><span id="line-602"></span><span class="hs-comment">--</span><span>
</span><span id="line-603"></span><span class="hs-comment">-- '$$' is associative, with identity 'empty', and also satisfies</span><span>
</span><span id="line-604"></span><span class="hs-comment">--</span><span>
</span><span id="line-605"></span><span class="hs-comment">-- * @(x '$$' y) '&lt;&gt;' z = x '$$' (y '&lt;&gt;' z)@, if @y@ non-empty.</span><span>
</span><span id="line-606"></span><span class="hs-comment">--</span><span>
</span><span id="line-607"></span><span class="annot"><a href="GHC.Utils.Ppr.html#%24%24"><span class="hs-operator hs-type">($$)</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span>
</span><span id="line-608"></span><span id="local-6989586621680783734"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783734"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="%24%24"><span class="annot"><span class="annottext">$$ :: Doc -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#%24%24"><span class="hs-operator hs-var hs-var">$$</span></a></span></span><span>  </span><span id="local-6989586621680783733"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783733"><span class="hs-identifier hs-var">q</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Bool -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#above_"><span class="hs-identifier hs-var">above_</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783734"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783733"><span class="hs-identifier hs-var">q</span></a></span><span>
</span><span id="line-609"></span><span>
</span><span id="line-610"></span><span class="hs-comment">-- | Above, with no overlapping.</span><span>
</span><span id="line-611"></span><span class="hs-comment">-- '$+$' is associative, with identity 'empty'.</span><span>
</span><span id="line-612"></span><span class="annot"><a href="GHC.Utils.Ppr.html#%24%2B%24"><span class="hs-operator hs-type">($+$)</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span>
</span><span id="line-613"></span><span id="local-6989586621680783731"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783731"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="%24%2B%24"><span class="annot"><span class="annottext">$+$ :: Doc -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#%24%2B%24"><span class="hs-operator hs-var hs-var">$+$</span></a></span></span><span> </span><span id="local-6989586621680783730"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783730"><span class="hs-identifier hs-var">q</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Bool -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#above_"><span class="hs-identifier hs-var">above_</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783731"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783730"><span class="hs-identifier hs-var">q</span></a></span><span>
</span><span id="line-614"></span><span>
</span><span id="line-615"></span><span class="annot"><a href="GHC.Utils.Ppr.html#above_"><span class="hs-identifier hs-type">above_</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span>
</span><span id="line-616"></span><span id="above_"><span class="annot"><span class="annottext">above_ :: Doc -&gt; Bool -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#above_"><span class="hs-identifier hs-var hs-var">above_</span></a></span></span><span> </span><span id="local-6989586621680783729"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783729"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783729"><span class="hs-identifier hs-var">p</span></a></span><span>
</span><span id="line-617"></span><span class="annot"><a href="GHC.Utils.Ppr.html#above_"><span class="hs-identifier hs-var">above_</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680783728"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783728"><span class="hs-identifier hs-var">q</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783728"><span class="hs-identifier hs-var">q</span></a></span><span>
</span><span id="line-618"></span><span class="annot"><a href="GHC.Utils.Ppr.html#above_"><span class="hs-identifier hs-var">above_</span></a></span><span> </span><span id="local-6989586621680783727"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783727"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621680783726"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783726"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span id="local-6989586621680783725"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783725"><span class="hs-identifier hs-var">q</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Bool -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#Above"><span class="hs-identifier hs-var">Above</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783727"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783726"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783725"><span class="hs-identifier hs-var">q</span></a></span><span>
</span><span id="line-619"></span><span>
</span><span id="line-620"></span><span class="annot"><a href="GHC.Utils.Ppr.html#above"><span class="hs-identifier hs-type">above</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#RDoc"><span class="hs-identifier hs-type">RDoc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#RDoc"><span class="hs-identifier hs-type">RDoc</span></a></span><span>
</span><span id="line-621"></span><span id="above"><span class="annot"><span class="annottext">above :: Doc -&gt; Bool -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#above"><span class="hs-identifier hs-var hs-var">above</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Above"><span class="hs-identifier hs-type">Above</span></a></span><span> </span><span id="local-6989586621680783724"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783724"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621680783723"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783723"><span class="hs-identifier hs-var">g1</span></a></span></span><span> </span><span id="local-6989586621680783722"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783722"><span class="hs-identifier hs-var">q1</span></a></span></span><span class="hs-special">)</span><span>  </span><span id="local-6989586621680783721"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783721"><span class="hs-identifier hs-var">g2</span></a></span></span><span> </span><span id="local-6989586621680783720"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783720"><span class="hs-identifier hs-var">q2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Bool -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#above"><span class="hs-identifier hs-var">above</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783724"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783723"><span class="hs-identifier hs-var">g1</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Doc -&gt; Bool -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#above"><span class="hs-identifier hs-var">above</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783722"><span class="hs-identifier hs-var">q1</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783721"><span class="hs-identifier hs-var">g2</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783720"><span class="hs-identifier hs-var">q2</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-622"></span><span class="annot"><a href="GHC.Utils.Ppr.html#above"><span class="hs-identifier hs-var">above</span></a></span><span> </span><span id="local-6989586621680783719"><span class="annot"><span class="annottext">p :: Doc
</span><a href="#local-6989586621680783719"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Beside"><span class="hs-identifier hs-type">Beside</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>     </span><span id="local-6989586621680783718"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783718"><span class="hs-identifier hs-var">g</span></a></span></span><span>  </span><span id="local-6989586621680783717"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783717"><span class="hs-identifier hs-var">q</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Bool -&gt; Int -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#aboveNest"><span class="hs-identifier hs-var">aboveNest</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#reduceDoc"><span class="hs-identifier hs-var">reduceDoc</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783719"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783718"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#reduceDoc"><span class="hs-identifier hs-var">reduceDoc</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783717"><span class="hs-identifier hs-var">q</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-623"></span><span class="annot"><a href="GHC.Utils.Ppr.html#above"><span class="hs-identifier hs-var">above</span></a></span><span> </span><span id="local-6989586621680783715"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783715"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621680783714"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783714"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span id="local-6989586621680783713"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783713"><span class="hs-identifier hs-var">q</span></a></span></span><span>                  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Bool -&gt; Int -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#aboveNest"><span class="hs-identifier hs-var">aboveNest</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783715"><span class="hs-identifier hs-var">p</span></a></span><span>             </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783714"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#reduceDoc"><span class="hs-identifier hs-var">reduceDoc</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783713"><span class="hs-identifier hs-var">q</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-624"></span><span>
</span><span id="line-625"></span><span class="hs-comment">-- Specification: aboveNest p g k q = p $g$ (nest k q)</span><span>
</span><span id="line-626"></span><span class="annot"><a href="GHC.Utils.Ppr.html#aboveNest"><span class="hs-identifier hs-type">aboveNest</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#RDoc"><span class="hs-identifier hs-type">RDoc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#RDoc"><span class="hs-identifier hs-type">RDoc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#RDoc"><span class="hs-identifier hs-type">RDoc</span></a></span><span>
</span><span id="line-627"></span><span id="aboveNest"><span class="annot"><span class="annottext">aboveNest :: Doc -&gt; Bool -&gt; Int -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#aboveNest"><span class="hs-identifier hs-var hs-var">aboveNest</span></a></span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><span class="hs-identifier">_</span></span><span>                   </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680783712"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783712"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783712"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">`seq`</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc
forall a. HasCallStack =&gt; a
</span><a href="../../base/src/GHC.Err.html#undefined"><span class="hs-identifier hs-var">undefined</span></a></span><span>
</span><span id="line-628"></span><span class="annot"><a href="GHC.Utils.Ppr.html#aboveNest"><span class="hs-identifier hs-var">aboveNest</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#NoDoc"><span class="hs-identifier hs-var">NoDoc</span></a></span><span>               </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#NoDoc"><span class="hs-identifier hs-var">NoDoc</span></a></span><span>
</span><span id="line-629"></span><span class="annot"><a href="GHC.Utils.Ppr.html#aboveNest"><span class="hs-identifier hs-var">aboveNest</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680783711"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783711"><span class="hs-identifier hs-var">p1</span></a></span></span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Union"><span class="hs-operator hs-type">`Union`</span></a></span><span> </span><span id="local-6989586621680783710"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783710"><span class="hs-identifier hs-var">p2</span></a></span></span><span class="hs-special">)</span><span>     </span><span id="local-6989586621680783709"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783709"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span id="local-6989586621680783708"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783708"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621680783707"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783707"><span class="hs-identifier hs-var">q</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Bool -&gt; Int -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#aboveNest"><span class="hs-identifier hs-var">aboveNest</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783711"><span class="hs-identifier hs-var">p1</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783709"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783708"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783707"><span class="hs-identifier hs-var">q</span></a></span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#union_"><span class="hs-operator hs-var">`union_`</span></a></span><span>
</span><span id="line-630"></span><span>                                      </span><span class="annot"><span class="annottext">Doc -&gt; Bool -&gt; Int -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#aboveNest"><span class="hs-identifier hs-var">aboveNest</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783710"><span class="hs-identifier hs-var">p2</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783709"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783708"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783707"><span class="hs-identifier hs-var">q</span></a></span><span>
</span><span id="line-631"></span><span>
</span><span id="line-632"></span><span class="annot"><a href="GHC.Utils.Ppr.html#aboveNest"><span class="hs-identifier hs-var">aboveNest</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span>               </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680783706"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783706"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621680783705"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783705"><span class="hs-identifier hs-var">q</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#mkNest"><span class="hs-identifier hs-var">mkNest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783706"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783705"><span class="hs-identifier hs-var">q</span></a></span><span>
</span><span id="line-633"></span><span class="annot"><a href="GHC.Utils.Ppr.html#aboveNest"><span class="hs-identifier hs-var">aboveNest</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Nest"><span class="hs-identifier hs-type">Nest</span></a></span><span> </span><span id="local-6989586621680783704"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783704"><span class="hs-identifier hs-var">k1</span></a></span></span><span> </span><span id="local-6989586621680783703"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783703"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">)</span><span>         </span><span id="local-6989586621680783702"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783702"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span id="local-6989586621680783701"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783701"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621680783700"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783700"><span class="hs-identifier hs-var">q</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#nest_"><span class="hs-identifier hs-var">nest_</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783704"><span class="hs-identifier hs-var">k1</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Doc -&gt; Bool -&gt; Int -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#aboveNest"><span class="hs-identifier hs-var">aboveNest</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783703"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783702"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783701"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783704"><span class="hs-identifier hs-var">k1</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783700"><span class="hs-identifier hs-var">q</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-634"></span><span>                                  </span><span class="hs-comment">-- p can't be Empty, so no need for mkNest</span><span>
</span><span id="line-635"></span><span>
</span><span id="line-636"></span><span class="annot"><a href="GHC.Utils.Ppr.html#aboveNest"><span class="hs-identifier hs-var">aboveNest</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#NilAbove"><span class="hs-identifier hs-type">NilAbove</span></a></span><span> </span><span id="local-6989586621680783699"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783699"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">)</span><span>        </span><span id="local-6989586621680783698"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783698"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span id="local-6989586621680783697"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783697"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621680783696"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783696"><span class="hs-identifier hs-var">q</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#nilAbove_"><span class="hs-identifier hs-var">nilAbove_</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Doc -&gt; Bool -&gt; Int -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#aboveNest"><span class="hs-identifier hs-var">aboveNest</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783699"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783698"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783697"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783696"><span class="hs-identifier hs-var">q</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-637"></span><span class="annot"><a href="GHC.Utils.Ppr.html#aboveNest"><span class="hs-identifier hs-var">aboveNest</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#TextBeside"><span class="hs-identifier hs-type">TextBeside</span></a></span><span> </span><span id="local-6989586621680783695"><span class="annot"><span class="annottext">TextDetails
</span><a href="#local-6989586621680783695"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span id="local-6989586621680783694"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783694"><span class="hs-identifier hs-var">sl</span></a></span></span><span> </span><span id="local-6989586621680783693"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783693"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680783692"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783692"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span id="local-6989586621680783691"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783691"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621680783690"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783690"><span class="hs-identifier hs-var">q</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TextDetails -&gt; Int -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#textBeside_"><span class="hs-identifier hs-var">textBeside_</span></a></span><span> </span><span class="annot"><span class="annottext">TextDetails
</span><a href="#local-6989586621680783695"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783694"><span class="hs-identifier hs-var">sl</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783689"><span class="hs-identifier hs-var">rest</span></a></span><span>
</span><span id="line-638"></span><span>                                    </span><span class="hs-keyword">where</span><span>
</span><span id="line-639"></span><span>                                      </span><span class="hs-glyph">!</span><span id="local-6989586621680783687"><span class="annot"><span class="annottext">k1 :: Int
</span><a href="#local-6989586621680783687"><span class="hs-identifier hs-var hs-var">k1</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783691"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783694"><span class="hs-identifier hs-var">sl</span></a></span><span>
</span><span id="line-640"></span><span>                                      </span><span id="local-6989586621680783689"><span class="annot"><span class="annottext">rest :: Doc
</span><a href="#local-6989586621680783689"><span class="hs-identifier hs-var hs-var">rest</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783693"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-641"></span><span>                                                </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Int -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#nilAboveNest"><span class="hs-identifier hs-var">nilAboveNest</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783692"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783687"><span class="hs-identifier hs-var">k1</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783690"><span class="hs-identifier hs-var">q</span></a></span><span>
</span><span id="line-642"></span><span>                                                </span><span class="annot"><span class="annottext">Doc
</span><span class="hs-identifier">_</span></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Bool -&gt; Int -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#aboveNest"><span class="hs-identifier hs-var">aboveNest</span></a></span><span>  </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783693"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783692"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783687"><span class="hs-identifier hs-var">k1</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783690"><span class="hs-identifier hs-var">q</span></a></span><span>
</span><span id="line-643"></span><span class="annot"><a href="GHC.Utils.Ppr.html#aboveNest"><span class="hs-identifier hs-var">aboveNest</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Above"><span class="hs-identifier hs-type">Above</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>          </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Doc
forall a. String -&gt; a
</span><a href="GHC.Utils.Ppr.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;aboveNest Above&quot;</span></span><span>
</span><span id="line-644"></span><span class="annot"><a href="GHC.Utils.Ppr.html#aboveNest"><span class="hs-identifier hs-var">aboveNest</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Beside"><span class="hs-identifier hs-type">Beside</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>         </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Doc
forall a. String -&gt; a
</span><a href="GHC.Utils.Ppr.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;aboveNest Beside&quot;</span></span><span>
</span><span id="line-645"></span><span>
</span><span id="line-646"></span><span class="hs-comment">-- Specification: text s &lt;&gt; nilaboveNest g k q</span><span>
</span><span id="line-647"></span><span class="hs-comment">--              = text s &lt;&gt; (text &quot;&quot; $g$ nest k q)</span><span>
</span><span id="line-648"></span><span class="annot"><a href="GHC.Utils.Ppr.html#nilAboveNest"><span class="hs-identifier hs-type">nilAboveNest</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#RDoc"><span class="hs-identifier hs-type">RDoc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#RDoc"><span class="hs-identifier hs-type">RDoc</span></a></span><span>
</span><span id="line-649"></span><span id="nilAboveNest"><span class="annot"><span class="annottext">nilAboveNest :: Bool -&gt; Int -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#nilAboveNest"><span class="hs-identifier hs-var hs-var">nilAboveNest</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680783684"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783684"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><span class="hs-identifier">_</span></span><span>           </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783684"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">`seq`</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc
forall a. HasCallStack =&gt; a
</span><a href="../../base/src/GHC.Err.html#undefined"><span class="hs-identifier hs-var">undefined</span></a></span><span>
</span><span id="line-650"></span><span class="annot"><a href="GHC.Utils.Ppr.html#nilAboveNest"><span class="hs-identifier hs-var">nilAboveNest</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span>
</span><span id="line-651"></span><span>                               </span><span class="hs-comment">-- Here's why the &quot;text s &lt;&gt;&quot; is in the spec!</span><span>
</span><span id="line-652"></span><span class="annot"><a href="GHC.Utils.Ppr.html#nilAboveNest"><span class="hs-identifier hs-var">nilAboveNest</span></a></span><span> </span><span id="local-6989586621680783683"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783683"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span id="local-6989586621680783682"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783682"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Nest"><span class="hs-identifier hs-type">Nest</span></a></span><span> </span><span id="local-6989586621680783681"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783681"><span class="hs-identifier hs-var">k1</span></a></span></span><span> </span><span id="local-6989586621680783680"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783680"><span class="hs-identifier hs-var">q</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Int -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#nilAboveNest"><span class="hs-identifier hs-var">nilAboveNest</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783683"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783682"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783681"><span class="hs-identifier hs-var">k1</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783680"><span class="hs-identifier hs-var">q</span></a></span><span>
</span><span id="line-653"></span><span class="annot"><a href="GHC.Utils.Ppr.html#nilAboveNest"><span class="hs-identifier hs-var">nilAboveNest</span></a></span><span> </span><span id="local-6989586621680783679"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783679"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span id="local-6989586621680783678"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783678"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621680783677"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783677"><span class="hs-identifier hs-var">q</span></a></span></span><span>           </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783679"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783678"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>      </span><span class="hs-comment">-- No newline if no overlap</span><span>
</span><span id="line-654"></span><span>                             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TextDetails -&gt; Int -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#textBeside_"><span class="hs-identifier hs-var">textBeside_</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Char -&gt; TextDetails
</span><a href="GHC.Utils.Ppr.html#RStr"><span class="hs-identifier hs-var">RStr</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783678"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">' '</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783678"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783677"><span class="hs-identifier hs-var">q</span></a></span><span>
</span><span id="line-655"></span><span>                             </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>           </span><span class="hs-comment">-- Put them really above</span><span>
</span><span id="line-656"></span><span>                             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#nilAbove_"><span class="hs-identifier hs-var">nilAbove_</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#mkNest"><span class="hs-identifier hs-var">mkNest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783678"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783677"><span class="hs-identifier hs-var">q</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-657"></span><span>
</span><span id="line-658"></span><span>
</span><span id="line-659"></span><span class="hs-comment">-- ---------------------------------------------------------------------------</span><span>
</span><span id="line-660"></span><span class="hs-comment">-- Horizontal composition @&lt;&gt;@</span><span>
</span><span id="line-661"></span><span>
</span><span id="line-662"></span><span class="hs-comment">-- We intentionally avoid Data.Monoid.(&lt;&gt;) here due to interactions of</span><span>
</span><span id="line-663"></span><span class="hs-comment">-- Data.Monoid.(&lt;&gt;) and (&lt;+&gt;).  See</span><span>
</span><span id="line-664"></span><span class="hs-comment">-- http://www.haskell.org/pipermail/libraries/2011-November/017066.html</span><span>
</span><span id="line-665"></span><span>
</span><span id="line-666"></span><span class="hs-comment">-- | Beside.</span><span>
</span><span id="line-667"></span><span class="hs-comment">-- '&lt;&gt;' is associative, with identity 'empty'.</span><span>
</span><span id="line-668"></span><span class="annot"><a href="GHC.Utils.Ppr.html#%3C%3E"><span class="hs-operator hs-type">(&lt;&gt;)</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span>
</span><span id="line-669"></span><span id="local-6989586621680783673"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783673"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="%3C%3E"><span class="annot"><span class="annottext">&lt;&gt; :: Doc -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#%3C%3E"><span class="hs-operator hs-var hs-var">&lt;&gt;</span></a></span></span><span>  </span><span id="local-6989586621680783672"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783672"><span class="hs-identifier hs-var">q</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Bool -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#beside_"><span class="hs-identifier hs-var">beside_</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783673"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783672"><span class="hs-identifier hs-var">q</span></a></span><span>
</span><span id="line-670"></span><span>
</span><span id="line-671"></span><span class="hs-comment">-- | Beside, separated by space, unless one of the arguments is 'empty'.</span><span>
</span><span id="line-672"></span><span class="hs-comment">-- '&lt;+&gt;' is associative, with identity 'empty'.</span><span>
</span><span id="line-673"></span><span class="annot"><a href="GHC.Utils.Ppr.html#%3C%2B%3E"><span class="hs-operator hs-type">(&lt;+&gt;)</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span>
</span><span id="line-674"></span><span id="local-6989586621680783670"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783670"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="%3C%2B%3E"><span class="annot"><span class="annottext">&lt;+&gt; :: Doc -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#%3C%2B%3E"><span class="hs-operator hs-var hs-var">&lt;+&gt;</span></a></span></span><span> </span><span id="local-6989586621680783669"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783669"><span class="hs-identifier hs-var">q</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Bool -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#beside_"><span class="hs-identifier hs-var">beside_</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783670"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>  </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783669"><span class="hs-identifier hs-var">q</span></a></span><span>
</span><span id="line-675"></span><span>
</span><span id="line-676"></span><span class="annot"><a href="GHC.Utils.Ppr.html#beside_"><span class="hs-identifier hs-type">beside_</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span>
</span><span id="line-677"></span><span id="beside_"><span class="annot"><span class="annottext">beside_ :: Doc -&gt; Bool -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#beside_"><span class="hs-identifier hs-var hs-var">beside_</span></a></span></span><span> </span><span id="local-6989586621680783668"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783668"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783668"><span class="hs-identifier hs-var">p</span></a></span><span>
</span><span id="line-678"></span><span class="annot"><a href="GHC.Utils.Ppr.html#beside_"><span class="hs-identifier hs-var">beside_</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680783667"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783667"><span class="hs-identifier hs-var">q</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783667"><span class="hs-identifier hs-var">q</span></a></span><span>
</span><span id="line-679"></span><span class="annot"><a href="GHC.Utils.Ppr.html#beside_"><span class="hs-identifier hs-var">beside_</span></a></span><span> </span><span id="local-6989586621680783666"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783666"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621680783665"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783665"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span id="local-6989586621680783664"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783664"><span class="hs-identifier hs-var">q</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Bool -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#Beside"><span class="hs-identifier hs-var">Beside</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783666"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783665"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783664"><span class="hs-identifier hs-var">q</span></a></span><span>
</span><span id="line-680"></span><span>
</span><span id="line-681"></span><span class="hs-comment">-- Specification: beside g p q = p &lt;g&gt; q</span><span>
</span><span id="line-682"></span><span class="annot"><a href="GHC.Utils.Ppr.html#beside"><span class="hs-identifier hs-type">beside</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#RDoc"><span class="hs-identifier hs-type">RDoc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#RDoc"><span class="hs-identifier hs-type">RDoc</span></a></span><span>
</span><span id="line-683"></span><span id="beside"><span class="annot"><span class="annottext">beside :: Doc -&gt; Bool -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#beside"><span class="hs-identifier hs-var hs-var">beside</span></a></span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#NoDoc"><span class="hs-identifier hs-var">NoDoc</span></a></span><span>               </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#NoDoc"><span class="hs-identifier hs-var">NoDoc</span></a></span><span>
</span><span id="line-684"></span><span class="annot"><a href="GHC.Utils.Ppr.html#beside"><span class="hs-identifier hs-var">beside</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680783663"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783663"><span class="hs-identifier hs-var">p1</span></a></span></span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Union"><span class="hs-operator hs-type">`Union`</span></a></span><span> </span><span id="local-6989586621680783662"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783662"><span class="hs-identifier hs-var">p2</span></a></span></span><span class="hs-special">)</span><span>     </span><span id="local-6989586621680783661"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783661"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span id="local-6989586621680783660"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783660"><span class="hs-identifier hs-var">q</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Bool -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#beside"><span class="hs-identifier hs-var">beside</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783663"><span class="hs-identifier hs-var">p1</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783661"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783660"><span class="hs-identifier hs-var">q</span></a></span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#union_"><span class="hs-operator hs-var">`union_`</span></a></span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Bool -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#beside"><span class="hs-identifier hs-var">beside</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783662"><span class="hs-identifier hs-var">p2</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783661"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783660"><span class="hs-identifier hs-var">q</span></a></span><span>
</span><span id="line-685"></span><span class="annot"><a href="GHC.Utils.Ppr.html#beside"><span class="hs-identifier hs-var">beside</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span>               </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680783659"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783659"><span class="hs-identifier hs-var">q</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783659"><span class="hs-identifier hs-var">q</span></a></span><span>
</span><span id="line-686"></span><span class="annot"><a href="GHC.Utils.Ppr.html#beside"><span class="hs-identifier hs-var">beside</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Nest"><span class="hs-identifier hs-type">Nest</span></a></span><span> </span><span id="local-6989586621680783658"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783658"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621680783657"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783657"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">)</span><span>          </span><span id="local-6989586621680783656"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783656"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span id="local-6989586621680783655"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783655"><span class="hs-identifier hs-var">q</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#nest_"><span class="hs-identifier hs-var">nest_</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783658"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">(Doc -&gt; Doc) -&gt; Doc -&gt; Doc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24%21"><span class="hs-operator hs-var">$!</span></a></span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Bool -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#beside"><span class="hs-identifier hs-var">beside</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783657"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783656"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783655"><span class="hs-identifier hs-var">q</span></a></span><span>
</span><span id="line-687"></span><span class="annot"><a href="GHC.Utils.Ppr.html#beside"><span class="hs-identifier hs-var">beside</span></a></span><span> </span><span id="local-6989586621680783654"><span class="annot"><span class="annottext">p :: Doc
</span><a href="#local-6989586621680783654"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Beside"><span class="hs-identifier hs-type">Beside</span></a></span><span> </span><span id="local-6989586621680783653"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783653"><span class="hs-identifier hs-var">p1</span></a></span></span><span> </span><span id="local-6989586621680783652"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783652"><span class="hs-identifier hs-var">g1</span></a></span></span><span> </span><span id="local-6989586621680783651"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783651"><span class="hs-identifier hs-var">q1</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680783650"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783650"><span class="hs-identifier hs-var">g2</span></a></span></span><span> </span><span id="local-6989586621680783649"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783649"><span class="hs-identifier hs-var">q2</span></a></span></span><span>
</span><span id="line-688"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783652"><span class="hs-identifier hs-var">g1</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783650"><span class="hs-identifier hs-var">g2</span></a></span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Bool -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#beside"><span class="hs-identifier hs-var">beside</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783653"><span class="hs-identifier hs-var">p1</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783652"><span class="hs-identifier hs-var">g1</span></a></span><span> </span><span class="annot"><span class="annottext">(Doc -&gt; Doc) -&gt; Doc -&gt; Doc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24%21"><span class="hs-operator hs-var">$!</span></a></span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Bool -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#beside"><span class="hs-identifier hs-var">beside</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783651"><span class="hs-identifier hs-var">q1</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783650"><span class="hs-identifier hs-var">g2</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783649"><span class="hs-identifier hs-var">q2</span></a></span><span>
</span><span id="line-689"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Bool -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#beside"><span class="hs-identifier hs-var">beside</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#reduceDoc"><span class="hs-identifier hs-var">reduceDoc</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783654"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783650"><span class="hs-identifier hs-var">g2</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783649"><span class="hs-identifier hs-var">q2</span></a></span><span>
</span><span id="line-690"></span><span class="annot"><a href="GHC.Utils.Ppr.html#beside"><span class="hs-identifier hs-var">beside</span></a></span><span> </span><span id="local-6989586621680783648"><span class="annot"><span class="annottext">p :: Doc
</span><a href="#local-6989586621680783648"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Above"><span class="hs-identifier hs-type">Above</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>         </span><span id="local-6989586621680783647"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783647"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span id="local-6989586621680783646"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783646"><span class="hs-identifier hs-var">q</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621680783645"><span class="annot"><span class="annottext">d :: Doc
</span><a href="#local-6989586621680783645"><span class="hs-identifier hs-var hs-var">d</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#reduceDoc"><span class="hs-identifier hs-var">reduceDoc</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783648"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Bool -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#beside"><span class="hs-identifier hs-var">beside</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783645"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783647"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783646"><span class="hs-identifier hs-var">q</span></a></span><span>
</span><span id="line-691"></span><span class="annot"><a href="GHC.Utils.Ppr.html#beside"><span class="hs-identifier hs-var">beside</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#NilAbove"><span class="hs-identifier hs-type">NilAbove</span></a></span><span> </span><span id="local-6989586621680783644"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783644"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">)</span><span>        </span><span id="local-6989586621680783643"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783643"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span id="local-6989586621680783642"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783642"><span class="hs-identifier hs-var">q</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#nilAbove_"><span class="hs-identifier hs-var">nilAbove_</span></a></span><span> </span><span class="annot"><span class="annottext">(Doc -&gt; Doc) -&gt; Doc -&gt; Doc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24%21"><span class="hs-operator hs-var">$!</span></a></span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Bool -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#beside"><span class="hs-identifier hs-var">beside</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783644"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783643"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783642"><span class="hs-identifier hs-var">q</span></a></span><span>
</span><span id="line-692"></span><span class="annot"><a href="GHC.Utils.Ppr.html#beside"><span class="hs-identifier hs-var">beside</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#TextBeside"><span class="hs-identifier hs-type">TextBeside</span></a></span><span> </span><span id="local-6989586621680783641"><span class="annot"><span class="annottext">TextDetails
</span><a href="#local-6989586621680783641"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span id="local-6989586621680783640"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783640"><span class="hs-identifier hs-var">sl</span></a></span></span><span> </span><span id="local-6989586621680783639"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783639"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680783638"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783638"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span id="local-6989586621680783637"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783637"><span class="hs-identifier hs-var">q</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TextDetails -&gt; Int -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#textBeside_"><span class="hs-identifier hs-var">textBeside_</span></a></span><span> </span><span class="annot"><span class="annottext">TextDetails
</span><a href="#local-6989586621680783641"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783640"><span class="hs-identifier hs-var">sl</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783636"><span class="hs-identifier hs-var">rest</span></a></span><span>
</span><span id="line-693"></span><span>                               </span><span class="hs-keyword">where</span><span>
</span><span id="line-694"></span><span>                                  </span><span id="local-6989586621680783636"><span class="annot"><span class="annottext">rest :: Doc
</span><a href="#local-6989586621680783636"><span class="hs-identifier hs-var hs-var">rest</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783639"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-695"></span><span>                                           </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#nilBeside"><span class="hs-identifier hs-var">nilBeside</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783638"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783637"><span class="hs-identifier hs-var">q</span></a></span><span>
</span><span id="line-696"></span><span>                                           </span><span class="annot"><span class="annottext">Doc
</span><span class="hs-identifier">_</span></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Bool -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#beside"><span class="hs-identifier hs-var">beside</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783639"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783638"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783637"><span class="hs-identifier hs-var">q</span></a></span><span>
</span><span id="line-697"></span><span>
</span><span id="line-698"></span><span class="hs-comment">-- Specification: text &quot;&quot; &lt;&gt; nilBeside g p</span><span>
</span><span id="line-699"></span><span class="hs-comment">--              = text &quot;&quot; &lt;g&gt; p</span><span>
</span><span id="line-700"></span><span class="annot"><a href="GHC.Utils.Ppr.html#nilBeside"><span class="hs-identifier hs-type">nilBeside</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#RDoc"><span class="hs-identifier hs-type">RDoc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#RDoc"><span class="hs-identifier hs-type">RDoc</span></a></span><span>
</span><span id="line-701"></span><span id="nilBeside"><span class="annot"><span class="annottext">nilBeside :: Bool -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#nilBeside"><span class="hs-identifier hs-var hs-var">nilBeside</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span> </span><span class="hs-comment">-- Hence the text &quot;&quot; in the spec</span><span>
</span><span id="line-702"></span><span class="annot"><a href="GHC.Utils.Ppr.html#nilBeside"><span class="hs-identifier hs-var">nilBeside</span></a></span><span> </span><span id="local-6989586621680783634"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783634"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Nest"><span class="hs-identifier hs-type">Nest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680783633"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783633"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#nilBeside"><span class="hs-identifier hs-var">nilBeside</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783634"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783633"><span class="hs-identifier hs-var">p</span></a></span><span>
</span><span id="line-703"></span><span class="annot"><a href="GHC.Utils.Ppr.html#nilBeside"><span class="hs-identifier hs-var">nilBeside</span></a></span><span> </span><span id="local-6989586621680783632"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783632"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span id="local-6989586621680783631"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783631"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783632"><span class="hs-identifier hs-var">g</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TextDetails -&gt; Int -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#textBeside_"><span class="hs-identifier hs-var">textBeside_</span></a></span><span> </span><span class="annot"><span class="annottext">TextDetails
</span><a href="GHC.Utils.Ppr.html#spaceText"><span class="hs-identifier hs-var">spaceText</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783631"><span class="hs-identifier hs-var">p</span></a></span><span>
</span><span id="line-704"></span><span>              </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783631"><span class="hs-identifier hs-var">p</span></a></span><span>
</span><span id="line-705"></span><span>
</span><span id="line-706"></span><span>
</span><span id="line-707"></span><span class="hs-comment">-- ---------------------------------------------------------------------------</span><span>
</span><span id="line-708"></span><span class="hs-comment">-- Separate, @sep@</span><span>
</span><span id="line-709"></span><span>
</span><span id="line-710"></span><span class="hs-comment">-- Specification: sep ps  = oneLiner (hsep ps)</span><span>
</span><span id="line-711"></span><span class="hs-comment">--                         `union`</span><span>
</span><span id="line-712"></span><span class="hs-comment">--                          vcat ps</span><span>
</span><span id="line-713"></span><span>
</span><span id="line-714"></span><span class="hs-comment">-- | Either 'hsep' or 'vcat'.</span><span>
</span><span id="line-715"></span><span class="annot"><a href="GHC.Utils.Ppr.html#sep"><span class="hs-identifier hs-type">sep</span></a></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span>
</span><span id="line-716"></span><span id="sep"><span class="annot"><span class="annottext">sep :: [Doc] -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#sep"><span class="hs-identifier hs-var hs-var">sep</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; [Doc] -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#sepX"><span class="hs-identifier hs-var">sepX</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>   </span><span class="hs-comment">-- Separate with spaces</span><span>
</span><span id="line-717"></span><span>
</span><span id="line-718"></span><span class="hs-comment">-- | Either 'hcat' or 'vcat'.</span><span>
</span><span id="line-719"></span><span class="annot"><a href="GHC.Utils.Ppr.html#cat"><span class="hs-identifier hs-type">cat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span>
</span><span id="line-720"></span><span id="cat"><span class="annot"><span class="annottext">cat :: [Doc] -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#cat"><span class="hs-identifier hs-var hs-var">cat</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; [Doc] -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#sepX"><span class="hs-identifier hs-var">sepX</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>  </span><span class="hs-comment">-- Don't</span><span>
</span><span id="line-721"></span><span>
</span><span id="line-722"></span><span class="annot"><a href="GHC.Utils.Ppr.html#sepX"><span class="hs-identifier hs-type">sepX</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span>
</span><span id="line-723"></span><span id="sepX"><span class="annot"><span class="annottext">sepX :: Bool -&gt; [Doc] -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#sepX"><span class="hs-identifier hs-var hs-var">sepX</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#empty"><span class="hs-identifier hs-var">empty</span></a></span><span>
</span><span id="line-724"></span><span class="annot"><a href="GHC.Utils.Ppr.html#sepX"><span class="hs-identifier hs-var">sepX</span></a></span><span> </span><span id="local-6989586621680783629"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783629"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680783628"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783628"><span class="hs-identifier hs-var">p</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621680783627"><span class="annot"><span class="annottext">[Doc]
</span><a href="#local-6989586621680783627"><span class="hs-identifier hs-var">ps</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Doc -&gt; Int -&gt; [Doc] -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#sep1"><span class="hs-identifier hs-var">sep1</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783629"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#reduceDoc"><span class="hs-identifier hs-var">reduceDoc</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783628"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">[Doc]
</span><a href="#local-6989586621680783627"><span class="hs-identifier hs-var">ps</span></a></span><span>
</span><span id="line-725"></span><span>
</span><span id="line-726"></span><span>
</span><span id="line-727"></span><span class="hs-comment">-- Specification: sep1 g k ys = sep (x : map (nest k) ys)</span><span>
</span><span id="line-728"></span><span class="hs-comment">--                            = oneLiner (x &lt;g&gt; nest k (hsep ys))</span><span>
</span><span id="line-729"></span><span class="hs-comment">--                              `union` x $$ nest k (vcat ys)</span><span>
</span><span id="line-730"></span><span class="annot"><a href="GHC.Utils.Ppr.html#sep1"><span class="hs-identifier hs-type">sep1</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#RDoc"><span class="hs-identifier hs-type">RDoc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#RDoc"><span class="hs-identifier hs-type">RDoc</span></a></span><span>
</span><span id="line-731"></span><span id="sep1"><span class="annot"><span class="annottext">sep1 :: Bool -&gt; Doc -&gt; Int -&gt; [Doc] -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#sep1"><span class="hs-identifier hs-var hs-var">sep1</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><span class="hs-identifier">_</span></span><span>                   </span><span id="local-6989586621680783625"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783625"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="annot"><span class="annottext">[Doc]
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783625"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">`seq`</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc
forall a. HasCallStack =&gt; a
</span><a href="../../base/src/GHC.Err.html#undefined"><span class="hs-identifier hs-var">undefined</span></a></span><span>
</span><span id="line-732"></span><span class="annot"><a href="GHC.Utils.Ppr.html#sep1"><span class="hs-identifier hs-var">sep1</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#NoDoc"><span class="hs-identifier hs-var">NoDoc</span></a></span><span>               </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[Doc]
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#NoDoc"><span class="hs-identifier hs-var">NoDoc</span></a></span><span>
</span><span id="line-733"></span><span class="annot"><a href="GHC.Utils.Ppr.html#sep1"><span class="hs-identifier hs-var">sep1</span></a></span><span> </span><span id="local-6989586621680783624"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783624"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680783623"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783623"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Union"><span class="hs-operator hs-type">`Union`</span></a></span><span> </span><span id="local-6989586621680783622"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783622"><span class="hs-identifier hs-var">q</span></a></span></span><span class="hs-special">)</span><span>       </span><span id="local-6989586621680783621"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783621"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621680783620"><span class="annot"><span class="annottext">[Doc]
</span><a href="#local-6989586621680783620"><span class="hs-identifier hs-var">ys</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Doc -&gt; Int -&gt; [Doc] -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#sep1"><span class="hs-identifier hs-var">sep1</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783624"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783623"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783621"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">[Doc]
</span><a href="#local-6989586621680783620"><span class="hs-identifier hs-var">ys</span></a></span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#union_"><span class="hs-operator hs-var">`union_`</span></a></span><span>
</span><span id="line-734"></span><span>                                  </span><span class="annot"><span class="annottext">Doc -&gt; Bool -&gt; Int -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#aboveNest"><span class="hs-identifier hs-var">aboveNest</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783622"><span class="hs-identifier hs-var">q</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783621"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#reduceDoc"><span class="hs-identifier hs-var">reduceDoc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Doc] -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="annot"><span class="annottext">[Doc]
</span><a href="#local-6989586621680783620"><span class="hs-identifier hs-var">ys</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-735"></span><span>
</span><span id="line-736"></span><span class="annot"><a href="GHC.Utils.Ppr.html#sep1"><span class="hs-identifier hs-var">sep1</span></a></span><span> </span><span id="local-6989586621680783619"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783619"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span>               </span><span id="local-6989586621680783618"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783618"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621680783617"><span class="annot"><span class="annottext">[Doc]
</span><a href="#local-6989586621680783617"><span class="hs-identifier hs-var">ys</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#mkNest"><span class="hs-identifier hs-var">mkNest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783618"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; [Doc] -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#sepX"><span class="hs-identifier hs-var">sepX</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783619"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">[Doc]
</span><a href="#local-6989586621680783617"><span class="hs-identifier hs-var">ys</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-737"></span><span class="annot"><a href="GHC.Utils.Ppr.html#sep1"><span class="hs-identifier hs-var">sep1</span></a></span><span> </span><span id="local-6989586621680783616"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783616"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Nest"><span class="hs-identifier hs-type">Nest</span></a></span><span> </span><span id="local-6989586621680783615"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783615"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621680783614"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783614"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">)</span><span>          </span><span id="local-6989586621680783613"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783613"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621680783612"><span class="annot"><span class="annottext">[Doc]
</span><a href="#local-6989586621680783612"><span class="hs-identifier hs-var">ys</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#nest_"><span class="hs-identifier hs-var">nest_</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783615"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; Doc -&gt; Int -&gt; [Doc] -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#sep1"><span class="hs-identifier hs-var">sep1</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783616"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783614"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783613"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783615"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Doc]
</span><a href="#local-6989586621680783612"><span class="hs-identifier hs-var">ys</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-738"></span><span>
</span><span id="line-739"></span><span class="annot"><a href="GHC.Utils.Ppr.html#sep1"><span class="hs-identifier hs-var">sep1</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#NilAbove"><span class="hs-identifier hs-type">NilAbove</span></a></span><span> </span><span id="local-6989586621680783611"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783611"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">)</span><span>        </span><span id="local-6989586621680783610"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783610"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621680783609"><span class="annot"><span class="annottext">[Doc]
</span><a href="#local-6989586621680783609"><span class="hs-identifier hs-var">ys</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#nilAbove_"><span class="hs-identifier hs-var">nilAbove_</span></a></span><span>
</span><span id="line-740"></span><span>                                  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Doc -&gt; Bool -&gt; Int -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#aboveNest"><span class="hs-identifier hs-var">aboveNest</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783611"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783610"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#reduceDoc"><span class="hs-identifier hs-var">reduceDoc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Doc] -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="annot"><span class="annottext">[Doc]
</span><a href="#local-6989586621680783609"><span class="hs-identifier hs-var">ys</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-741"></span><span class="annot"><a href="GHC.Utils.Ppr.html#sep1"><span class="hs-identifier hs-var">sep1</span></a></span><span> </span><span id="local-6989586621680783608"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783608"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#TextBeside"><span class="hs-identifier hs-type">TextBeside</span></a></span><span> </span><span id="local-6989586621680783607"><span class="annot"><span class="annottext">TextDetails
</span><a href="#local-6989586621680783607"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span id="local-6989586621680783606"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783606"><span class="hs-identifier hs-var">sl</span></a></span></span><span> </span><span id="local-6989586621680783605"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783605"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680783604"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783604"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621680783603"><span class="annot"><span class="annottext">[Doc]
</span><a href="#local-6989586621680783603"><span class="hs-identifier hs-var">ys</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TextDetails -&gt; Int -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#textBeside_"><span class="hs-identifier hs-var">textBeside_</span></a></span><span> </span><span class="annot"><span class="annottext">TextDetails
</span><a href="#local-6989586621680783607"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783606"><span class="hs-identifier hs-var">sl</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; Doc -&gt; Int -&gt; [Doc] -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#sepNB"><span class="hs-identifier hs-var">sepNB</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783608"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783605"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783604"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783606"><span class="hs-identifier hs-var">sl</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Doc]
</span><a href="#local-6989586621680783603"><span class="hs-identifier hs-var">ys</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-742"></span><span class="annot"><a href="GHC.Utils.Ppr.html#sep1"><span class="hs-identifier hs-var">sep1</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Above"><span class="hs-identifier hs-type">Above</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>          </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[Doc]
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Doc
forall a. String -&gt; a
</span><a href="GHC.Utils.Ppr.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;sep1 Above&quot;</span></span><span>
</span><span id="line-743"></span><span class="annot"><a href="GHC.Utils.Ppr.html#sep1"><span class="hs-identifier hs-var">sep1</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Beside"><span class="hs-identifier hs-type">Beside</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>         </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[Doc]
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Doc
forall a. String -&gt; a
</span><a href="GHC.Utils.Ppr.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;sep1 Beside&quot;</span></span><span>
</span><span id="line-744"></span><span>
</span><span id="line-745"></span><span class="hs-comment">-- Specification: sepNB p k ys = sep1 (text &quot;&quot; &lt;&gt; p) k ys</span><span>
</span><span id="line-746"></span><span class="hs-comment">-- Called when we have already found some text in the first item</span><span>
</span><span id="line-747"></span><span class="hs-comment">-- We have to eat up nests</span><span>
</span><span id="line-748"></span><span class="annot"><a href="GHC.Utils.Ppr.html#sepNB"><span class="hs-identifier hs-type">sepNB</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span>
</span><span id="line-749"></span><span id="sepNB"><span class="annot"><span class="annottext">sepNB :: Bool -&gt; Doc -&gt; Int -&gt; [Doc] -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#sepNB"><span class="hs-identifier hs-var hs-var">sepNB</span></a></span></span><span> </span><span id="local-6989586621680783601"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783601"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Nest"><span class="hs-identifier hs-type">Nest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680783600"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783600"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680783599"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783599"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621680783598"><span class="annot"><span class="annottext">[Doc]
</span><a href="#local-6989586621680783598"><span class="hs-identifier hs-var">ys</span></a></span></span><span>
</span><span id="line-750"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Doc -&gt; Int -&gt; [Doc] -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#sepNB"><span class="hs-identifier hs-var">sepNB</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783601"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783600"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783599"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">[Doc]
</span><a href="#local-6989586621680783598"><span class="hs-identifier hs-var">ys</span></a></span><span> </span><span class="hs-comment">-- Never triggered, because of invariant (2)</span><span>
</span><span id="line-751"></span><span class="annot"><a href="GHC.Utils.Ppr.html#sepNB"><span class="hs-identifier hs-var">sepNB</span></a></span><span> </span><span id="local-6989586621680783597"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783597"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span> </span><span id="local-6989586621680783596"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783596"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621680783595"><span class="annot"><span class="annottext">[Doc]
</span><a href="#local-6989586621680783595"><span class="hs-identifier hs-var">ys</span></a></span></span><span>
</span><span id="line-752"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#oneLiner"><span class="hs-identifier hs-var">oneLiner</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#nilBeside"><span class="hs-identifier hs-var">nilBeside</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783597"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#reduceDoc"><span class="hs-identifier hs-var">reduceDoc</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783593"><span class="hs-identifier hs-var">rest</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#mkUnion"><span class="hs-operator hs-var">`mkUnion`</span></a></span><span>
</span><span id="line-753"></span><span>    </span><span class="hs-comment">-- XXX: TODO: PRETTY: Used to use True here (but GHC used False...)</span><span>
</span><span id="line-754"></span><span>    </span><span class="annot"><span class="annottext">Bool -&gt; Int -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#nilAboveNest"><span class="hs-identifier hs-var">nilAboveNest</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783596"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#reduceDoc"><span class="hs-identifier hs-var">reduceDoc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Doc] -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="annot"><span class="annottext">[Doc]
</span><a href="#local-6989586621680783595"><span class="hs-identifier hs-var">ys</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-755"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-756"></span><span>    </span><span id="local-6989586621680783593"><span class="annot"><span class="annottext">rest :: Doc
</span><a href="#local-6989586621680783593"><span class="hs-identifier hs-var hs-var">rest</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783597"><span class="hs-identifier hs-var">g</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Doc] -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#hsep"><span class="hs-identifier hs-var">hsep</span></a></span><span> </span><span class="annot"><span class="annottext">[Doc]
</span><a href="#local-6989586621680783595"><span class="hs-identifier hs-var">ys</span></a></span><span>
</span><span id="line-757"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Doc] -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#hcat"><span class="hs-identifier hs-var">hcat</span></a></span><span> </span><span class="annot"><span class="annottext">[Doc]
</span><a href="#local-6989586621680783595"><span class="hs-identifier hs-var">ys</span></a></span><span>
</span><span id="line-758"></span><span class="annot"><a href="GHC.Utils.Ppr.html#sepNB"><span class="hs-identifier hs-var">sepNB</span></a></span><span> </span><span id="local-6989586621680783592"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783592"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span id="local-6989586621680783591"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783591"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621680783590"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783590"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621680783589"><span class="annot"><span class="annottext">[Doc]
</span><a href="#local-6989586621680783589"><span class="hs-identifier hs-var">ys</span></a></span></span><span>
</span><span id="line-759"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Doc -&gt; Int -&gt; [Doc] -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#sep1"><span class="hs-identifier hs-var">sep1</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783592"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783591"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783590"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">[Doc]
</span><a href="#local-6989586621680783589"><span class="hs-identifier hs-var">ys</span></a></span><span>
</span><span id="line-760"></span><span>
</span><span id="line-761"></span><span>
</span><span id="line-762"></span><span class="hs-comment">-- ---------------------------------------------------------------------------</span><span>
</span><span id="line-763"></span><span class="hs-comment">-- @fill@</span><span>
</span><span id="line-764"></span><span>
</span><span id="line-765"></span><span class="hs-comment">-- | \&quot;Paragraph fill\&quot; version of 'cat'.</span><span>
</span><span id="line-766"></span><span class="annot"><a href="GHC.Utils.Ppr.html#fcat"><span class="hs-identifier hs-type">fcat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span>
</span><span id="line-767"></span><span id="fcat"><span class="annot"><span class="annottext">fcat :: [Doc] -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#fcat"><span class="hs-identifier hs-var hs-var">fcat</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; [Doc] -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#fill"><span class="hs-identifier hs-var">fill</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-768"></span><span>
</span><span id="line-769"></span><span class="hs-comment">-- | \&quot;Paragraph fill\&quot; version of 'sep'.</span><span>
</span><span id="line-770"></span><span class="annot"><a href="GHC.Utils.Ppr.html#fsep"><span class="hs-identifier hs-type">fsep</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span>
</span><span id="line-771"></span><span id="fsep"><span class="annot"><span class="annottext">fsep :: [Doc] -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#fsep"><span class="hs-identifier hs-var hs-var">fsep</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; [Doc] -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#fill"><span class="hs-identifier hs-var">fill</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-772"></span><span>
</span><span id="line-773"></span><span class="hs-comment">-- Specification:</span><span>
</span><span id="line-774"></span><span class="hs-comment">--</span><span>
</span><span id="line-775"></span><span class="hs-comment">-- fill g docs = fillIndent 0 docs</span><span>
</span><span id="line-776"></span><span class="hs-comment">--</span><span>
</span><span id="line-777"></span><span class="hs-comment">-- fillIndent k [] = []</span><span>
</span><span id="line-778"></span><span class="hs-comment">-- fillIndent k [p] = p</span><span>
</span><span id="line-779"></span><span class="hs-comment">-- fillIndent k (p1:p2:ps) =</span><span>
</span><span id="line-780"></span><span class="hs-comment">--    oneLiner p1 &lt;g&gt; fillIndent (k + length p1 + g ? 1 : 0)</span><span>
</span><span id="line-781"></span><span class="hs-comment">--                               (remove_nests (oneLiner p2) : ps)</span><span>
</span><span id="line-782"></span><span class="hs-comment">--     `Union`</span><span>
</span><span id="line-783"></span><span class="hs-comment">--    (p1 $*$ nest (-k) (fillIndent 0 ps))</span><span>
</span><span id="line-784"></span><span class="hs-comment">--</span><span>
</span><span id="line-785"></span><span class="hs-comment">-- $*$ is defined for layouts (not Docs) as</span><span>
</span><span id="line-786"></span><span class="hs-comment">-- layout1 $*$ layout2 | hasMoreThanOneLine layout1 = layout1 $$ layout2</span><span>
</span><span id="line-787"></span><span class="hs-comment">--                     | otherwise                  = layout1 $+$ layout2</span><span>
</span><span id="line-788"></span><span>
</span><span id="line-789"></span><span class="annot"><a href="GHC.Utils.Ppr.html#fill"><span class="hs-identifier hs-type">fill</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#RDoc"><span class="hs-identifier hs-type">RDoc</span></a></span><span>
</span><span id="line-790"></span><span id="fill"><span class="annot"><span class="annottext">fill :: Bool -&gt; [Doc] -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#fill"><span class="hs-identifier hs-var hs-var">fill</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#empty"><span class="hs-identifier hs-var">empty</span></a></span><span>
</span><span id="line-791"></span><span class="annot"><a href="GHC.Utils.Ppr.html#fill"><span class="hs-identifier hs-var">fill</span></a></span><span> </span><span id="local-6989586621680783587"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783587"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680783586"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783586"><span class="hs-identifier hs-var">p</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621680783585"><span class="annot"><span class="annottext">[Doc]
</span><a href="#local-6989586621680783585"><span class="hs-identifier hs-var">ps</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Doc -&gt; Int -&gt; [Doc] -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#fill1"><span class="hs-identifier hs-var">fill1</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783587"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#reduceDoc"><span class="hs-identifier hs-var">reduceDoc</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783586"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">[Doc]
</span><a href="#local-6989586621680783585"><span class="hs-identifier hs-var">ps</span></a></span><span>
</span><span id="line-792"></span><span>
</span><span id="line-793"></span><span class="annot"><a href="GHC.Utils.Ppr.html#fill1"><span class="hs-identifier hs-type">fill1</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#RDoc"><span class="hs-identifier hs-type">RDoc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span>
</span><span id="line-794"></span><span id="fill1"><span class="annot"><span class="annottext">fill1 :: Bool -&gt; Doc -&gt; Int -&gt; [Doc] -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#fill1"><span class="hs-identifier hs-var hs-var">fill1</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><span class="hs-identifier">_</span></span><span>                   </span><span id="local-6989586621680783583"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783583"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="annot"><span class="annottext">[Doc]
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783583"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">`seq`</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc
forall a. HasCallStack =&gt; a
</span><a href="../../base/src/GHC.Err.html#undefined"><span class="hs-identifier hs-var">undefined</span></a></span><span>
</span><span id="line-795"></span><span class="annot"><a href="GHC.Utils.Ppr.html#fill1"><span class="hs-identifier hs-var">fill1</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#NoDoc"><span class="hs-identifier hs-var">NoDoc</span></a></span><span>               </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[Doc]
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#NoDoc"><span class="hs-identifier hs-var">NoDoc</span></a></span><span>
</span><span id="line-796"></span><span class="annot"><a href="GHC.Utils.Ppr.html#fill1"><span class="hs-identifier hs-var">fill1</span></a></span><span> </span><span id="local-6989586621680783582"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783582"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680783581"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783581"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Union"><span class="hs-operator hs-type">`Union`</span></a></span><span> </span><span id="local-6989586621680783580"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783580"><span class="hs-identifier hs-var">q</span></a></span></span><span class="hs-special">)</span><span>       </span><span id="local-6989586621680783579"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783579"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621680783578"><span class="annot"><span class="annottext">[Doc]
</span><a href="#local-6989586621680783578"><span class="hs-identifier hs-var">ys</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Doc -&gt; Int -&gt; [Doc] -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#fill1"><span class="hs-identifier hs-var">fill1</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783582"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783581"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783579"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">[Doc]
</span><a href="#local-6989586621680783578"><span class="hs-identifier hs-var">ys</span></a></span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#union_"><span class="hs-operator hs-var">`union_`</span></a></span><span>
</span><span id="line-797"></span><span>                                   </span><span class="annot"><span class="annottext">Doc -&gt; Bool -&gt; Int -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#aboveNest"><span class="hs-identifier hs-var">aboveNest</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783580"><span class="hs-identifier hs-var">q</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783579"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; [Doc] -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#fill"><span class="hs-identifier hs-var">fill</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783582"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">[Doc]
</span><a href="#local-6989586621680783578"><span class="hs-identifier hs-var">ys</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-798"></span><span class="annot"><a href="GHC.Utils.Ppr.html#fill1"><span class="hs-identifier hs-var">fill1</span></a></span><span> </span><span id="local-6989586621680783577"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783577"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span>               </span><span id="local-6989586621680783576"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783576"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621680783575"><span class="annot"><span class="annottext">[Doc]
</span><a href="#local-6989586621680783575"><span class="hs-identifier hs-var">ys</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#mkNest"><span class="hs-identifier hs-var">mkNest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783576"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; [Doc] -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#fill"><span class="hs-identifier hs-var">fill</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783577"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">[Doc]
</span><a href="#local-6989586621680783575"><span class="hs-identifier hs-var">ys</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-799"></span><span class="annot"><a href="GHC.Utils.Ppr.html#fill1"><span class="hs-identifier hs-var">fill1</span></a></span><span> </span><span id="local-6989586621680783574"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783574"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Nest"><span class="hs-identifier hs-type">Nest</span></a></span><span> </span><span id="local-6989586621680783573"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783573"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621680783572"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783572"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">)</span><span>          </span><span id="local-6989586621680783571"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783571"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621680783570"><span class="annot"><span class="annottext">[Doc]
</span><a href="#local-6989586621680783570"><span class="hs-identifier hs-var">ys</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#nest_"><span class="hs-identifier hs-var">nest_</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783573"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; Doc -&gt; Int -&gt; [Doc] -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#fill1"><span class="hs-identifier hs-var">fill1</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783574"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783572"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783571"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783573"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Doc]
</span><a href="#local-6989586621680783570"><span class="hs-identifier hs-var">ys</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-800"></span><span class="annot"><a href="GHC.Utils.Ppr.html#fill1"><span class="hs-identifier hs-var">fill1</span></a></span><span> </span><span id="local-6989586621680783569"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783569"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#NilAbove"><span class="hs-identifier hs-type">NilAbove</span></a></span><span> </span><span id="local-6989586621680783568"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783568"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">)</span><span>        </span><span id="local-6989586621680783567"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783567"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621680783566"><span class="annot"><span class="annottext">[Doc]
</span><a href="#local-6989586621680783566"><span class="hs-identifier hs-var">ys</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#nilAbove_"><span class="hs-identifier hs-var">nilAbove_</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Doc -&gt; Bool -&gt; Int -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#aboveNest"><span class="hs-identifier hs-var">aboveNest</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783568"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783567"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; [Doc] -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#fill"><span class="hs-identifier hs-var">fill</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783569"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">[Doc]
</span><a href="#local-6989586621680783566"><span class="hs-identifier hs-var">ys</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-801"></span><span class="annot"><a href="GHC.Utils.Ppr.html#fill1"><span class="hs-identifier hs-var">fill1</span></a></span><span> </span><span id="local-6989586621680783565"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783565"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#TextBeside"><span class="hs-identifier hs-type">TextBeside</span></a></span><span> </span><span id="local-6989586621680783564"><span class="annot"><span class="annottext">TextDetails
</span><a href="#local-6989586621680783564"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span id="local-6989586621680783563"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783563"><span class="hs-identifier hs-var">sl</span></a></span></span><span> </span><span id="local-6989586621680783562"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783562"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680783561"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783561"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621680783560"><span class="annot"><span class="annottext">[Doc]
</span><a href="#local-6989586621680783560"><span class="hs-identifier hs-var">ys</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TextDetails -&gt; Int -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#textBeside_"><span class="hs-identifier hs-var">textBeside_</span></a></span><span> </span><span class="annot"><span class="annottext">TextDetails
</span><a href="#local-6989586621680783564"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783563"><span class="hs-identifier hs-var">sl</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; Doc -&gt; Int -&gt; [Doc] -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#fillNB"><span class="hs-identifier hs-var">fillNB</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783565"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783562"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783561"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783563"><span class="hs-identifier hs-var">sl</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Doc]
</span><a href="#local-6989586621680783560"><span class="hs-identifier hs-var">ys</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-802"></span><span class="annot"><a href="GHC.Utils.Ppr.html#fill1"><span class="hs-identifier hs-var">fill1</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Above"><span class="hs-identifier hs-type">Above</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>          </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[Doc]
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Doc
forall a. String -&gt; a
</span><a href="GHC.Utils.Ppr.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;fill1 Above&quot;</span></span><span>
</span><span id="line-803"></span><span class="annot"><a href="GHC.Utils.Ppr.html#fill1"><span class="hs-identifier hs-var">fill1</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Beside"><span class="hs-identifier hs-type">Beside</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>         </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[Doc]
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Doc
forall a. String -&gt; a
</span><a href="GHC.Utils.Ppr.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;fill1 Beside&quot;</span></span><span>
</span><span id="line-804"></span><span>
</span><span id="line-805"></span><span class="annot"><a href="GHC.Utils.Ppr.html#fillNB"><span class="hs-identifier hs-type">fillNB</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span>
</span><span id="line-806"></span><span id="fillNB"><span class="annot"><span class="annottext">fillNB :: Bool -&gt; Doc -&gt; Int -&gt; [Doc] -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#fillNB"><span class="hs-identifier hs-var hs-var">fillNB</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><span class="hs-identifier">_</span></span><span>           </span><span id="local-6989586621680783558"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783558"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="annot"><span class="annottext">[Doc]
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783558"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">`seq`</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc
forall a. HasCallStack =&gt; a
</span><a href="../../base/src/GHC.Err.html#undefined"><span class="hs-identifier hs-var">undefined</span></a></span><span>
</span><span id="line-807"></span><span class="annot"><a href="GHC.Utils.Ppr.html#fillNB"><span class="hs-identifier hs-var">fillNB</span></a></span><span> </span><span id="local-6989586621680783557"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783557"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Nest"><span class="hs-identifier hs-type">Nest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680783556"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783556"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">)</span><span>  </span><span id="local-6989586621680783555"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783555"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621680783554"><span class="annot"><span class="annottext">[Doc]
</span><a href="#local-6989586621680783554"><span class="hs-identifier hs-var">ys</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Doc -&gt; Int -&gt; [Doc] -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#fillNB"><span class="hs-identifier hs-var">fillNB</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783557"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783556"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783555"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">[Doc]
</span><a href="#local-6989586621680783554"><span class="hs-identifier hs-var">ys</span></a></span><span>
</span><span id="line-808"></span><span>                              </span><span class="hs-comment">-- Never triggered, because of invariant (2)</span><span>
</span><span id="line-809"></span><span class="annot"><a href="GHC.Utils.Ppr.html#fillNB"><span class="hs-identifier hs-var">fillNB</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span>
</span><span id="line-810"></span><span class="annot"><a href="GHC.Utils.Ppr.html#fillNB"><span class="hs-identifier hs-var">fillNB</span></a></span><span> </span><span id="local-6989586621680783553"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783553"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span> </span><span id="local-6989586621680783552"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783552"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621680783551"><span class="annot"><span class="annottext">[Doc]
</span><a href="#local-6989586621680783551"><span class="hs-identifier hs-var">ys</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Doc -&gt; Int -&gt; [Doc] -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#fillNB"><span class="hs-identifier hs-var">fillNB</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783553"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783552"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">[Doc]
</span><a href="#local-6989586621680783551"><span class="hs-identifier hs-var">ys</span></a></span><span>
</span><span id="line-811"></span><span class="annot"><a href="GHC.Utils.Ppr.html#fillNB"><span class="hs-identifier hs-var">fillNB</span></a></span><span> </span><span id="local-6989586621680783550"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783550"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span> </span><span id="local-6989586621680783549"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783549"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680783548"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783548"><span class="hs-identifier hs-var">y</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621680783547"><span class="annot"><span class="annottext">[Doc]
</span><a href="#local-6989586621680783547"><span class="hs-identifier hs-var">ys</span></a></span></span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Int -&gt; Doc -&gt; [Doc] -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#fillNBE"><span class="hs-identifier hs-var">fillNBE</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783550"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783549"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783548"><span class="hs-identifier hs-var">y</span></a></span><span> </span><span class="annot"><span class="annottext">[Doc]
</span><a href="#local-6989586621680783547"><span class="hs-identifier hs-var">ys</span></a></span><span>
</span><span id="line-812"></span><span class="annot"><a href="GHC.Utils.Ppr.html#fillNB"><span class="hs-identifier hs-var">fillNB</span></a></span><span> </span><span id="local-6989586621680783545"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783545"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span id="local-6989586621680783544"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783544"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621680783543"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783543"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621680783542"><span class="annot"><span class="annottext">[Doc]
</span><a href="#local-6989586621680783542"><span class="hs-identifier hs-var">ys</span></a></span></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Doc -&gt; Int -&gt; [Doc] -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#fill1"><span class="hs-identifier hs-var">fill1</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783545"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783544"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783543"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">[Doc]
</span><a href="#local-6989586621680783542"><span class="hs-identifier hs-var">ys</span></a></span><span>
</span><span id="line-813"></span><span>
</span><span id="line-814"></span><span>
</span><span id="line-815"></span><span class="annot"><a href="GHC.Utils.Ppr.html#fillNBE"><span class="hs-identifier hs-type">fillNBE</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span>
</span><span id="line-816"></span><span id="fillNBE"><span class="annot"><span class="annottext">fillNBE :: Bool -&gt; Int -&gt; Doc -&gt; [Doc] -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#fillNBE"><span class="hs-identifier hs-var hs-var">fillNBE</span></a></span></span><span> </span><span id="local-6989586621680783541"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783541"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span id="local-6989586621680783540"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783540"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621680783539"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783539"><span class="hs-identifier hs-var">y</span></a></span></span><span> </span><span id="local-6989586621680783538"><span class="annot"><span class="annottext">[Doc]
</span><a href="#local-6989586621680783538"><span class="hs-identifier hs-var">ys</span></a></span></span><span>
</span><span id="line-817"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#nilBeside"><span class="hs-identifier hs-var">nilBeside</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783541"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; Doc -&gt; Int -&gt; [Doc] -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#fill1"><span class="hs-identifier hs-var">fill1</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783541"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#elideNest"><span class="hs-identifier hs-var">elideNest</span></a></span><span> </span><span class="annot"><span class="annottext">(Doc -&gt; Doc) -&gt; (Doc -&gt; Doc) -&gt; Doc -&gt; Doc
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#oneLiner"><span class="hs-identifier hs-var">oneLiner</span></a></span><span> </span><span class="annot"><span class="annottext">(Doc -&gt; Doc) -&gt; (Doc -&gt; Doc) -&gt; Doc -&gt; Doc
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#reduceDoc"><span class="hs-identifier hs-var">reduceDoc</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783539"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783536"><span class="hs-identifier hs-var">k'</span></a></span><span> </span><span class="annot"><span class="annottext">[Doc]
</span><a href="#local-6989586621680783538"><span class="hs-identifier hs-var">ys</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-818"></span><span>    </span><span class="hs-comment">-- XXX: TODO: PRETTY: Used to use True here (but GHC used False...)</span><span>
</span><span id="line-819"></span><span>    </span><span class="annot"><span class="annottext">Doc -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#mkUnion"><span class="hs-operator hs-var">`mkUnion`</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Int -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#nilAboveNest"><span class="hs-identifier hs-var">nilAboveNest</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783540"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; [Doc] -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#fill"><span class="hs-identifier hs-var">fill</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783541"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783539"><span class="hs-identifier hs-var">y</span></a></span><span class="annot"><span class="annottext">Doc -&gt; [Doc] -&gt; [Doc]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">[Doc]
</span><a href="#local-6989586621680783538"><span class="hs-identifier hs-var">ys</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-820"></span><span>  </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621680783536"><span class="annot"><span class="annottext">k' :: Int
</span><a href="#local-6989586621680783536"><span class="hs-identifier hs-var hs-var">k'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680783541"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783540"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783540"><span class="hs-identifier hs-var">k</span></a></span><span>
</span><span id="line-821"></span><span>
</span><span id="line-822"></span><span class="annot"><a href="GHC.Utils.Ppr.html#elideNest"><span class="hs-identifier hs-type">elideNest</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span>
</span><span id="line-823"></span><span id="elideNest"><span class="annot"><span class="annottext">elideNest :: Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#elideNest"><span class="hs-identifier hs-var hs-var">elideNest</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Nest"><span class="hs-identifier hs-type">Nest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680783533"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783533"><span class="hs-identifier hs-var">d</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783533"><span class="hs-identifier hs-var">d</span></a></span><span>
</span><span id="line-824"></span><span class="annot"><a href="GHC.Utils.Ppr.html#elideNest"><span class="hs-identifier hs-var">elideNest</span></a></span><span> </span><span id="local-6989586621680783532"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783532"><span class="hs-identifier hs-var">d</span></a></span></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783532"><span class="hs-identifier hs-var">d</span></a></span><span>
</span><span id="line-825"></span><span>
</span><span id="line-826"></span><span class="hs-comment">-- ---------------------------------------------------------------------------</span><span>
</span><span id="line-827"></span><span class="hs-comment">-- Selecting the best layout</span><span>
</span><span id="line-828"></span><span>
</span><span id="line-829"></span><span class="annot"><a href="GHC.Utils.Ppr.html#best"><span class="hs-identifier hs-type">best</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>   </span><span class="hs-comment">-- Line length</span><span>
</span><span id="line-830"></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>   </span><span class="hs-comment">-- Ribbon length</span><span>
</span><span id="line-831"></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#RDoc"><span class="hs-identifier hs-type">RDoc</span></a></span><span>
</span><span id="line-832"></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#RDoc"><span class="hs-identifier hs-type">RDoc</span></a></span><span>  </span><span class="hs-comment">-- No unions in here!</span><span>
</span><span id="line-833"></span><span id="best"><span class="annot"><span class="annottext">best :: Int -&gt; Int -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#best"><span class="hs-identifier hs-var hs-var">best</span></a></span></span><span> </span><span id="local-6989586621680783530"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783530"><span class="hs-identifier hs-var">w0</span></a></span></span><span> </span><span id="local-6989586621680783529"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783529"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Doc -&gt; Doc
</span><a href="#local-6989586621680783528"><span class="hs-identifier hs-var">get</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783530"><span class="hs-identifier hs-var">w0</span></a></span><span>
</span><span id="line-834"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-835"></span><span>    </span><span class="annot"><a href="#local-6989586621680783528"><span class="hs-identifier hs-type">get</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>          </span><span class="hs-comment">-- (Remaining) width of line</span><span>
</span><span id="line-836"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span>
</span><span id="line-837"></span><span>    </span><span id="local-6989586621680783528"><span class="annot"><span class="annottext">get :: Int -&gt; Doc -&gt; Doc
</span><a href="#local-6989586621680783528"><span class="hs-identifier hs-var hs-var">get</span></a></span></span><span> </span><span id="local-6989586621680783527"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783527"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783527"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc
forall a. HasCallStack =&gt; a
</span><a href="../../base/src/GHC.Err.html#undefined"><span class="hs-identifier hs-var">undefined</span></a></span><span>
</span><span id="line-838"></span><span>    </span><span class="annot"><a href="#local-6989586621680783528"><span class="hs-identifier hs-var">get</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span>
</span><span id="line-839"></span><span>    </span><span class="annot"><a href="#local-6989586621680783528"><span class="hs-identifier hs-var">get</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#NoDoc"><span class="hs-identifier hs-var">NoDoc</span></a></span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#NoDoc"><span class="hs-identifier hs-var">NoDoc</span></a></span><span>
</span><span id="line-840"></span><span>    </span><span class="annot"><a href="#local-6989586621680783528"><span class="hs-identifier hs-var">get</span></a></span><span> </span><span id="local-6989586621680783526"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783526"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#NilAbove"><span class="hs-identifier hs-type">NilAbove</span></a></span><span> </span><span id="local-6989586621680783525"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783525"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">)</span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#nilAbove_"><span class="hs-identifier hs-var">nilAbove_</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Doc -&gt; Doc
</span><a href="#local-6989586621680783528"><span class="hs-identifier hs-var">get</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783526"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783525"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-841"></span><span>    </span><span class="annot"><a href="#local-6989586621680783528"><span class="hs-identifier hs-var">get</span></a></span><span> </span><span id="local-6989586621680783524"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783524"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#TextBeside"><span class="hs-identifier hs-type">TextBeside</span></a></span><span> </span><span id="local-6989586621680783523"><span class="annot"><span class="annottext">TextDetails
</span><a href="#local-6989586621680783523"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span id="local-6989586621680783522"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783522"><span class="hs-identifier hs-var">sl</span></a></span></span><span> </span><span id="local-6989586621680783521"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783521"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TextDetails -&gt; Int -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#textBeside_"><span class="hs-identifier hs-var">textBeside_</span></a></span><span> </span><span class="annot"><span class="annottext">TextDetails
</span><a href="#local-6989586621680783523"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783522"><span class="hs-identifier hs-var">sl</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Doc -&gt; Doc
</span><a href="#local-6989586621680783520"><span class="hs-identifier hs-var">get1</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783524"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783522"><span class="hs-identifier hs-var">sl</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783521"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-842"></span><span>    </span><span class="annot"><a href="#local-6989586621680783528"><span class="hs-identifier hs-var">get</span></a></span><span> </span><span id="local-6989586621680783519"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783519"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Nest"><span class="hs-identifier hs-type">Nest</span></a></span><span> </span><span id="local-6989586621680783518"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783518"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621680783517"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783517"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">)</span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#nest_"><span class="hs-identifier hs-var">nest_</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783518"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Doc -&gt; Doc
</span><a href="#local-6989586621680783528"><span class="hs-identifier hs-var">get</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783519"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783518"><span class="hs-identifier hs-var">k</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783517"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-843"></span><span>    </span><span class="annot"><a href="#local-6989586621680783528"><span class="hs-identifier hs-var">get</span></a></span><span> </span><span id="local-6989586621680783516"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783516"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680783515"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783515"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Union"><span class="hs-operator hs-type">`Union`</span></a></span><span> </span><span id="local-6989586621680783514"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783514"><span class="hs-identifier hs-var">q</span></a></span></span><span class="hs-special">)</span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Doc -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#nicest"><span class="hs-identifier hs-var">nicest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783516"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783529"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Doc -&gt; Doc
</span><a href="#local-6989586621680783528"><span class="hs-identifier hs-var">get</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783516"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783515"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Doc -&gt; Doc
</span><a href="#local-6989586621680783528"><span class="hs-identifier hs-var">get</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783516"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783514"><span class="hs-identifier hs-var">q</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-844"></span><span>    </span><span class="annot"><a href="#local-6989586621680783528"><span class="hs-identifier hs-var">get</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Above"><span class="hs-identifier hs-type">Above</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Doc
forall a. String -&gt; a
</span><a href="GHC.Utils.Ppr.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;best get Above&quot;</span></span><span>
</span><span id="line-845"></span><span>    </span><span class="annot"><a href="#local-6989586621680783528"><span class="hs-identifier hs-var">get</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Beside"><span class="hs-identifier hs-type">Beside</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Doc
forall a. String -&gt; a
</span><a href="GHC.Utils.Ppr.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;best get Beside&quot;</span></span><span>
</span><span id="line-846"></span><span>
</span><span id="line-847"></span><span>    </span><span class="annot"><a href="#local-6989586621680783520"><span class="hs-identifier hs-type">get1</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>         </span><span class="hs-comment">-- (Remaining) width of line</span><span>
</span><span id="line-848"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>         </span><span class="hs-comment">-- Amount of first line already eaten up</span><span>
</span><span id="line-849"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span>         </span><span class="hs-comment">-- This is an argument to TextBeside =&gt; eat Nests</span><span>
</span><span id="line-850"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span>         </span><span class="hs-comment">-- No unions in here!</span><span>
</span><span id="line-851"></span><span>
</span><span id="line-852"></span><span>    </span><span id="local-6989586621680783520"><span class="annot"><span class="annottext">get1 :: Int -&gt; Int -&gt; Doc -&gt; Doc
</span><a href="#local-6989586621680783520"><span class="hs-identifier hs-var hs-var">get1</span></a></span></span><span> </span><span id="local-6989586621680783512"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783512"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783512"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc
forall a. HasCallStack =&gt; a
</span><a href="../../base/src/GHC.Err.html#undefined"><span class="hs-identifier hs-var">undefined</span></a></span><span>
</span><span id="line-853"></span><span>    </span><span class="annot"><a href="#local-6989586621680783520"><span class="hs-identifier hs-var">get1</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span>  </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span>
</span><span id="line-854"></span><span>    </span><span class="annot"><a href="#local-6989586621680783520"><span class="hs-identifier hs-var">get1</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span>  </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#NoDoc"><span class="hs-identifier hs-var">NoDoc</span></a></span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#NoDoc"><span class="hs-identifier hs-var">NoDoc</span></a></span><span>
</span><span id="line-855"></span><span>    </span><span class="annot"><a href="#local-6989586621680783520"><span class="hs-identifier hs-var">get1</span></a></span><span> </span><span id="local-6989586621680783511"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783511"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span id="local-6989586621680783510"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783510"><span class="hs-identifier hs-var">sl</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#NilAbove"><span class="hs-identifier hs-type">NilAbove</span></a></span><span> </span><span id="local-6989586621680783509"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783509"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">)</span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#nilAbove_"><span class="hs-identifier hs-var">nilAbove_</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Doc -&gt; Doc
</span><a href="#local-6989586621680783528"><span class="hs-identifier hs-var">get</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783511"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783510"><span class="hs-identifier hs-var">sl</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783509"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-856"></span><span>    </span><span class="annot"><a href="#local-6989586621680783520"><span class="hs-identifier hs-var">get1</span></a></span><span> </span><span id="local-6989586621680783508"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783508"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span id="local-6989586621680783507"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783507"><span class="hs-identifier hs-var">sl</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#TextBeside"><span class="hs-identifier hs-type">TextBeside</span></a></span><span> </span><span id="local-6989586621680783506"><span class="annot"><span class="annottext">TextDetails
</span><a href="#local-6989586621680783506"><span class="hs-identifier hs-var">t</span></a></span></span><span> </span><span id="local-6989586621680783505"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783505"><span class="hs-identifier hs-var">tl</span></a></span></span><span> </span><span id="local-6989586621680783504"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783504"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TextDetails -&gt; Int -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#textBeside_"><span class="hs-identifier hs-var">textBeside_</span></a></span><span> </span><span class="annot"><span class="annottext">TextDetails
</span><a href="#local-6989586621680783506"><span class="hs-identifier hs-var">t</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783505"><span class="hs-identifier hs-var">tl</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Doc -&gt; Doc
</span><a href="#local-6989586621680783520"><span class="hs-identifier hs-var">get1</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783508"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783507"><span class="hs-identifier hs-var">sl</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783505"><span class="hs-identifier hs-var">tl</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783504"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-857"></span><span>    </span><span class="annot"><a href="#local-6989586621680783520"><span class="hs-identifier hs-var">get1</span></a></span><span> </span><span id="local-6989586621680783503"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783503"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span id="local-6989586621680783502"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783502"><span class="hs-identifier hs-var">sl</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Nest"><span class="hs-identifier hs-type">Nest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680783501"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783501"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">)</span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Doc -&gt; Doc
</span><a href="#local-6989586621680783520"><span class="hs-identifier hs-var">get1</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783503"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783502"><span class="hs-identifier hs-var">sl</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783501"><span class="hs-identifier hs-var">p</span></a></span><span>
</span><span id="line-858"></span><span>    </span><span class="annot"><a href="#local-6989586621680783520"><span class="hs-identifier hs-var">get1</span></a></span><span> </span><span id="local-6989586621680783500"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783500"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span id="local-6989586621680783499"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783499"><span class="hs-identifier hs-var">sl</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680783498"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783498"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Union"><span class="hs-operator hs-type">`Union`</span></a></span><span> </span><span id="local-6989586621680783497"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783497"><span class="hs-identifier hs-var">q</span></a></span></span><span class="hs-special">)</span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int -&gt; Doc -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#nicest1"><span class="hs-identifier hs-var">nicest1</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783500"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783529"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783499"><span class="hs-identifier hs-var">sl</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Doc -&gt; Doc
</span><a href="#local-6989586621680783520"><span class="hs-identifier hs-var">get1</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783500"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783499"><span class="hs-identifier hs-var">sl</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783498"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-859"></span><span>                                                   </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Doc -&gt; Doc
</span><a href="#local-6989586621680783520"><span class="hs-identifier hs-var">get1</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783500"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783499"><span class="hs-identifier hs-var">sl</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783497"><span class="hs-identifier hs-var">q</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-860"></span><span>    </span><span class="annot"><a href="#local-6989586621680783520"><span class="hs-identifier hs-var">get1</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Above"><span class="hs-identifier hs-type">Above</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Doc
forall a. String -&gt; a
</span><a href="GHC.Utils.Ppr.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;best get1 Above&quot;</span></span><span>
</span><span id="line-861"></span><span>    </span><span class="annot"><a href="#local-6989586621680783520"><span class="hs-identifier hs-var">get1</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Beside"><span class="hs-identifier hs-type">Beside</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Doc
forall a. String -&gt; a
</span><a href="GHC.Utils.Ppr.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;best get1 Beside&quot;</span></span><span>
</span><span id="line-862"></span><span>
</span><span id="line-863"></span><span class="annot"><a href="GHC.Utils.Ppr.html#nicest"><span class="hs-identifier hs-type">nicest</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span>
</span><span id="line-864"></span><span id="nicest"><span class="annot"><span class="annottext">nicest :: Int -&gt; Int -&gt; Doc -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#nicest"><span class="hs-identifier hs-var hs-var">nicest</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621680783495"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783495"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621680783494"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783494"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int -&gt; Doc -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#nicest1"><span class="hs-identifier hs-var">nicest1</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783495"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783494"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-865"></span><span>
</span><span id="line-866"></span><span class="annot"><a href="GHC.Utils.Ppr.html#nicest1"><span class="hs-identifier hs-type">nicest1</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span>
</span><span id="line-867"></span><span id="nicest1"><span class="annot"><span class="annottext">nicest1 :: Int -&gt; Int -&gt; Int -&gt; Doc -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#nicest1"><span class="hs-identifier hs-var hs-var">nicest1</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621680783493"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783493"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621680783492"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783492"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621680783491"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783491"><span class="hs-identifier hs-var">sl</span></a></span></span><span> </span><span id="local-6989586621680783490"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783490"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621680783489"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783489"><span class="hs-identifier hs-var">q</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Doc -&gt; Bool
</span><a href="GHC.Utils.Ppr.html#fits"><span class="hs-identifier hs-var">fits</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783493"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Ord a =&gt; a -&gt; a -&gt; a
</span><span class="hs-operator hs-var">`min`</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783492"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783491"><span class="hs-identifier hs-var">sl</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783490"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783490"><span class="hs-identifier hs-var">p</span></a></span><span>
</span><span id="line-868"></span><span>                      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>                 </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783489"><span class="hs-identifier hs-var">q</span></a></span><span>
</span><span id="line-869"></span><span>
</span><span id="line-870"></span><span class="annot"><a href="GHC.Utils.Ppr.html#fits"><span class="hs-identifier hs-type">fits</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>  </span><span class="hs-comment">-- Space available</span><span>
</span><span id="line-871"></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span>
</span><span id="line-872"></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-comment">-- True if *first line* of Doc fits in space available</span><span>
</span><span id="line-873"></span><span id="fits"><span class="annot"><span class="annottext">fits :: Int -&gt; Doc -&gt; Bool
</span><a href="GHC.Utils.Ppr.html#fits"><span class="hs-identifier hs-var hs-var">fits</span></a></span></span><span> </span><span id="local-6989586621680783486"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783486"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783486"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-874"></span><span class="annot"><a href="GHC.Utils.Ppr.html#fits"><span class="hs-identifier hs-var">fits</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#NoDoc"><span class="hs-identifier hs-var">NoDoc</span></a></span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-875"></span><span class="annot"><a href="GHC.Utils.Ppr.html#fits"><span class="hs-identifier hs-var">fits</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-876"></span><span class="annot"><a href="GHC.Utils.Ppr.html#fits"><span class="hs-identifier hs-var">fits</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#NilAbove"><span class="hs-identifier hs-type">NilAbove</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-877"></span><span class="annot"><a href="GHC.Utils.Ppr.html#fits"><span class="hs-identifier hs-var">fits</span></a></span><span> </span><span id="local-6989586621680783484"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783484"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#TextBeside"><span class="hs-identifier hs-type">TextBeside</span></a></span><span> </span><span class="annot"><span class="annottext">TextDetails
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680783483"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783483"><span class="hs-identifier hs-var">sl</span></a></span></span><span> </span><span id="local-6989586621680783482"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783482"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Doc -&gt; Bool
</span><a href="GHC.Utils.Ppr.html#fits"><span class="hs-identifier hs-var">fits</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783484"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783483"><span class="hs-identifier hs-var">sl</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783482"><span class="hs-identifier hs-var">p</span></a></span><span>
</span><span id="line-878"></span><span class="annot"><a href="GHC.Utils.Ppr.html#fits"><span class="hs-identifier hs-var">fits</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Above"><span class="hs-identifier hs-type">Above</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Bool
forall a. String -&gt; a
</span><a href="GHC.Utils.Ppr.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;fits Above&quot;</span></span><span>
</span><span id="line-879"></span><span class="annot"><a href="GHC.Utils.Ppr.html#fits"><span class="hs-identifier hs-var">fits</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Beside"><span class="hs-identifier hs-type">Beside</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Bool
forall a. String -&gt; a
</span><a href="GHC.Utils.Ppr.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;fits Beside&quot;</span></span><span>
</span><span id="line-880"></span><span class="annot"><a href="GHC.Utils.Ppr.html#fits"><span class="hs-identifier hs-var">fits</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Union"><span class="hs-identifier hs-type">Union</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Bool
forall a. String -&gt; a
</span><a href="GHC.Utils.Ppr.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;fits Union&quot;</span></span><span>
</span><span id="line-881"></span><span class="annot"><a href="GHC.Utils.Ppr.html#fits"><span class="hs-identifier hs-var">fits</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Nest"><span class="hs-identifier hs-type">Nest</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Bool
forall a. String -&gt; a
</span><a href="GHC.Utils.Ppr.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;fits Nest&quot;</span></span><span>
</span><span id="line-882"></span><span>
</span><span id="line-883"></span><span class="hs-comment">-- | @first@ returns its first argument if it is non-empty, otherwise its second.</span><span>
</span><span id="line-884"></span><span class="annot"><a href="GHC.Utils.Ppr.html#first"><span class="hs-identifier hs-type">first</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span>
</span><span id="line-885"></span><span id="first"><span class="annot"><span class="annottext">first :: Doc -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#first"><span class="hs-identifier hs-var hs-var">first</span></a></span></span><span> </span><span id="local-6989586621680783480"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783480"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621680783479"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783479"><span class="hs-identifier hs-var">q</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Bool
</span><a href="GHC.Utils.Ppr.html#nonEmptySet"><span class="hs-identifier hs-var">nonEmptySet</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783480"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783480"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="hs-comment">-- unused, because (get OneLineMode) is unused</span><span>
</span><span id="line-886"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783479"><span class="hs-identifier hs-var">q</span></a></span><span>
</span><span id="line-887"></span><span>
</span><span id="line-888"></span><span class="annot"><a href="GHC.Utils.Ppr.html#nonEmptySet"><span class="hs-identifier hs-type">nonEmptySet</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-889"></span><span id="nonEmptySet"><span class="annot"><span class="annottext">nonEmptySet :: Doc -&gt; Bool
</span><a href="GHC.Utils.Ppr.html#nonEmptySet"><span class="hs-identifier hs-var hs-var">nonEmptySet</span></a></span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#NoDoc"><span class="hs-identifier hs-var">NoDoc</span></a></span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-890"></span><span class="annot"><a href="GHC.Utils.Ppr.html#nonEmptySet"><span class="hs-identifier hs-var">nonEmptySet</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Doc
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Union"><span class="hs-operator hs-type">`Union`</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-891"></span><span class="annot"><a href="GHC.Utils.Ppr.html#nonEmptySet"><span class="hs-identifier hs-var">nonEmptySet</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-892"></span><span class="annot"><a href="GHC.Utils.Ppr.html#nonEmptySet"><span class="hs-identifier hs-var">nonEmptySet</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#NilAbove"><span class="hs-identifier hs-type">NilAbove</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-893"></span><span class="annot"><a href="GHC.Utils.Ppr.html#nonEmptySet"><span class="hs-identifier hs-var">nonEmptySet</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#TextBeside"><span class="hs-identifier hs-type">TextBeside</span></a></span><span> </span><span class="annot"><span class="annottext">TextDetails
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680783477"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783477"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Bool
</span><a href="GHC.Utils.Ppr.html#nonEmptySet"><span class="hs-identifier hs-var">nonEmptySet</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783477"><span class="hs-identifier hs-var">p</span></a></span><span>
</span><span id="line-894"></span><span class="annot"><a href="GHC.Utils.Ppr.html#nonEmptySet"><span class="hs-identifier hs-var">nonEmptySet</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Nest"><span class="hs-identifier hs-type">Nest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680783476"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783476"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">)</span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Bool
</span><a href="GHC.Utils.Ppr.html#nonEmptySet"><span class="hs-identifier hs-var">nonEmptySet</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783476"><span class="hs-identifier hs-var">p</span></a></span><span>
</span><span id="line-895"></span><span class="annot"><a href="GHC.Utils.Ppr.html#nonEmptySet"><span class="hs-identifier hs-var">nonEmptySet</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Above"><span class="hs-identifier hs-type">Above</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Bool
forall a. String -&gt; a
</span><a href="GHC.Utils.Ppr.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;nonEmptySet Above&quot;</span></span><span>
</span><span id="line-896"></span><span class="annot"><a href="GHC.Utils.Ppr.html#nonEmptySet"><span class="hs-identifier hs-var">nonEmptySet</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Beside"><span class="hs-identifier hs-type">Beside</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Bool
forall a. String -&gt; a
</span><a href="GHC.Utils.Ppr.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;nonEmptySet Beside&quot;</span></span><span>
</span><span id="line-897"></span><span>
</span><span id="line-898"></span><span class="hs-comment">-- @oneLiner@ returns the one-line members of the given set of @GDoc@s.</span><span>
</span><span id="line-899"></span><span class="annot"><a href="GHC.Utils.Ppr.html#oneLiner"><span class="hs-identifier hs-type">oneLiner</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span>
</span><span id="line-900"></span><span id="oneLiner"><span class="annot"><span class="annottext">oneLiner :: Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#oneLiner"><span class="hs-identifier hs-var hs-var">oneLiner</span></a></span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#NoDoc"><span class="hs-identifier hs-var">NoDoc</span></a></span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#NoDoc"><span class="hs-identifier hs-var">NoDoc</span></a></span><span>
</span><span id="line-901"></span><span class="annot"><a href="GHC.Utils.Ppr.html#oneLiner"><span class="hs-identifier hs-var">oneLiner</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span>
</span><span id="line-902"></span><span class="annot"><a href="GHC.Utils.Ppr.html#oneLiner"><span class="hs-identifier hs-var">oneLiner</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#NilAbove"><span class="hs-identifier hs-type">NilAbove</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#NoDoc"><span class="hs-identifier hs-var">NoDoc</span></a></span><span>
</span><span id="line-903"></span><span class="annot"><a href="GHC.Utils.Ppr.html#oneLiner"><span class="hs-identifier hs-var">oneLiner</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#TextBeside"><span class="hs-identifier hs-type">TextBeside</span></a></span><span> </span><span id="local-6989586621680783475"><span class="annot"><span class="annottext">TextDetails
</span><a href="#local-6989586621680783475"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span id="local-6989586621680783474"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783474"><span class="hs-identifier hs-var">sl</span></a></span></span><span> </span><span id="local-6989586621680783473"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783473"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TextDetails -&gt; Int -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#textBeside_"><span class="hs-identifier hs-var">textBeside_</span></a></span><span> </span><span class="annot"><span class="annottext">TextDetails
</span><a href="#local-6989586621680783475"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783474"><span class="hs-identifier hs-var">sl</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#oneLiner"><span class="hs-identifier hs-var">oneLiner</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783473"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-904"></span><span class="annot"><a href="GHC.Utils.Ppr.html#oneLiner"><span class="hs-identifier hs-var">oneLiner</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Nest"><span class="hs-identifier hs-type">Nest</span></a></span><span> </span><span id="local-6989586621680783472"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783472"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621680783471"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783471"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">)</span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#nest_"><span class="hs-identifier hs-var">nest_</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783472"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#oneLiner"><span class="hs-identifier hs-var">oneLiner</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783471"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-905"></span><span class="annot"><a href="GHC.Utils.Ppr.html#oneLiner"><span class="hs-identifier hs-var">oneLiner</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680783470"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783470"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Union"><span class="hs-operator hs-type">`Union`</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#oneLiner"><span class="hs-identifier hs-var">oneLiner</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783470"><span class="hs-identifier hs-var">p</span></a></span><span>
</span><span id="line-906"></span><span class="annot"><a href="GHC.Utils.Ppr.html#oneLiner"><span class="hs-identifier hs-var">oneLiner</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Above"><span class="hs-identifier hs-type">Above</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Doc
forall a. String -&gt; a
</span><a href="GHC.Utils.Ppr.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;oneLiner Above&quot;</span></span><span>
</span><span id="line-907"></span><span class="annot"><a href="GHC.Utils.Ppr.html#oneLiner"><span class="hs-identifier hs-var">oneLiner</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Beside"><span class="hs-identifier hs-type">Beside</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Doc
forall a. String -&gt; a
</span><a href="GHC.Utils.Ppr.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;oneLiner Beside&quot;</span></span><span>
</span><span id="line-908"></span><span>
</span><span id="line-909"></span><span>
</span><span id="line-910"></span><span class="hs-comment">-- ---------------------------------------------------------------------------</span><span>
</span><span id="line-911"></span><span class="hs-comment">-- Rendering</span><span>
</span><span id="line-912"></span><span>
</span><span id="line-913"></span><span class="hs-comment">-- | A rendering style.</span><span>
</span><span id="line-914"></span><span class="hs-keyword">data</span><span> </span><span id="Style"><span class="annot"><a href="GHC.Utils.Ppr.html#Style"><span class="hs-identifier hs-var">Style</span></a></span></span><span>
</span><span id="line-915"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="Style"><span class="annot"><a href="GHC.Utils.Ppr.html#Style"><span class="hs-identifier hs-var">Style</span></a></span></span><span> </span><span class="hs-special">{</span><span> </span><span id="mode"><span class="annot"><span class="annottext">Style -&gt; Mode
</span><a href="GHC.Utils.Ppr.html#mode"><span class="hs-identifier hs-var hs-var">mode</span></a></span></span><span>           </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Mode"><span class="hs-identifier hs-type">Mode</span></a></span><span>  </span><span class="hs-comment">-- ^ The rendering mode</span><span>
</span><span id="line-916"></span><span>          </span><span class="hs-special">,</span><span> </span><span id="lineLength"><span class="annot"><span class="annottext">Style -&gt; Int
</span><a href="GHC.Utils.Ppr.html#lineLength"><span class="hs-identifier hs-var hs-var">lineLength</span></a></span></span><span>     </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>   </span><span class="hs-comment">-- ^ Length of line, in chars</span><span>
</span><span id="line-917"></span><span>          </span><span class="hs-special">,</span><span> </span><span id="ribbonsPerLine"><span class="annot"><span class="annottext">Style -&gt; Float
</span><a href="GHC.Utils.Ppr.html#ribbonsPerLine"><span class="hs-identifier hs-var hs-var">ribbonsPerLine</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Float</span></span><span> </span><span class="hs-comment">-- ^ Ratio of line length to ribbon length</span><span>
</span><span id="line-918"></span><span>          </span><span class="hs-special">}</span><span>
</span><span id="line-919"></span><span>
</span><span id="line-920"></span><span class="hs-comment">-- | The default style (@mode=PageMode, lineLength=100, ribbonsPerLine=1.5@).</span><span>
</span><span id="line-921"></span><span class="annot"><a href="GHC.Utils.Ppr.html#style"><span class="hs-identifier hs-type">style</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Style"><span class="hs-identifier hs-type">Style</span></a></span><span>
</span><span id="line-922"></span><span id="style"><span class="annot"><span class="annottext">style :: Style
</span><a href="GHC.Utils.Ppr.html#style"><span class="hs-identifier hs-var hs-var">style</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Style :: Mode -&gt; Int -&gt; Float -&gt; Style
</span><a href="GHC.Utils.Ppr.html#Style"><span class="hs-identifier hs-type">Style</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">lineLength :: Int
</span><a href="GHC.Utils.Ppr.html#lineLength"><span class="hs-identifier hs-var">lineLength</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">100</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ribbonsPerLine :: Float
</span><a href="GHC.Utils.Ppr.html#ribbonsPerLine"><span class="hs-identifier hs-var">ribbonsPerLine</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Float
</span><span class="hs-number">1.5</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">mode :: Mode
</span><a href="GHC.Utils.Ppr.html#mode"><span class="hs-identifier hs-var">mode</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Mode
</span><a href="GHC.Utils.Ppr.html#PageMode"><span class="hs-identifier hs-var">PageMode</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-923"></span><span>
</span><span id="line-924"></span><span class="hs-comment">-- | Rendering mode.</span><span>
</span><span id="line-925"></span><span class="hs-keyword">data</span><span> </span><span id="Mode"><span class="annot"><a href="GHC.Utils.Ppr.html#Mode"><span class="hs-identifier hs-var">Mode</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="PageMode"><span class="annot"><a href="GHC.Utils.Ppr.html#PageMode"><span class="hs-identifier hs-var">PageMode</span></a></span></span><span>     </span><span class="hs-comment">-- ^ Normal</span><span>
</span><span id="line-926"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span id="ZigZagMode"><span class="annot"><a href="GHC.Utils.Ppr.html#ZigZagMode"><span class="hs-identifier hs-var">ZigZagMode</span></a></span></span><span>   </span><span class="hs-comment">-- ^ With zig-zag cuts</span><span>
</span><span id="line-927"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span id="LeftMode"><span class="annot"><a href="GHC.Utils.Ppr.html#LeftMode"><span class="hs-identifier hs-var">LeftMode</span></a></span></span><span>     </span><span class="hs-comment">-- ^ No indentation, infinitely long lines</span><span>
</span><span id="line-928"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span id="OneLineMode"><span class="annot"><a href="GHC.Utils.Ppr.html#OneLineMode"><span class="hs-identifier hs-var">OneLineMode</span></a></span></span><span>  </span><span class="hs-comment">-- ^ All on one line</span><span>
</span><span id="line-929"></span><span>
</span><span id="line-930"></span><span class="hs-comment">-- | Render the @Doc@ to a String using the given @Style@.</span><span>
</span><span id="line-931"></span><span class="annot"><a href="GHC.Utils.Ppr.html#renderStyle"><span class="hs-identifier hs-type">renderStyle</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Style"><span class="hs-identifier hs-type">Style</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-932"></span><span id="renderStyle"><span class="annot"><span class="annottext">renderStyle :: Style -&gt; Doc -&gt; String
</span><a href="GHC.Utils.Ppr.html#renderStyle"><span class="hs-identifier hs-var hs-var">renderStyle</span></a></span></span><span> </span><span id="local-6989586621680783464"><span class="annot"><span class="annottext">Style
</span><a href="#local-6989586621680783464"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Mode
-&gt; Int
-&gt; Float
-&gt; (TextDetails -&gt; ShowS)
-&gt; String
-&gt; Doc
-&gt; String
forall a.
Mode -&gt; Int -&gt; Float -&gt; (TextDetails -&gt; a -&gt; a) -&gt; a -&gt; Doc -&gt; a
</span><a href="GHC.Utils.Ppr.html#fullRender"><span class="hs-identifier hs-var">fullRender</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Style -&gt; Mode
</span><a href="GHC.Utils.Ppr.html#mode"><span class="hs-identifier hs-var hs-var">mode</span></a></span><span> </span><span class="annot"><span class="annottext">Style
</span><a href="#local-6989586621680783464"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Style -&gt; Int
</span><a href="GHC.Utils.Ppr.html#lineLength"><span class="hs-identifier hs-var hs-var">lineLength</span></a></span><span> </span><span class="annot"><span class="annottext">Style
</span><a href="#local-6989586621680783464"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Style -&gt; Float
</span><a href="GHC.Utils.Ppr.html#ribbonsPerLine"><span class="hs-identifier hs-var hs-var">ribbonsPerLine</span></a></span><span> </span><span class="annot"><span class="annottext">Style
</span><a href="#local-6989586621680783464"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-933"></span><span>                </span><span class="annot"><span class="annottext">TextDetails -&gt; ShowS
</span><a href="GHC.Utils.Ppr.html#txtPrinter"><span class="hs-identifier hs-var">txtPrinter</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span>
</span><span id="line-934"></span><span>
</span><span id="line-935"></span><span class="hs-comment">-- | Default TextDetails printer</span><span>
</span><span id="line-936"></span><span class="annot"><a href="GHC.Utils.Ppr.html#txtPrinter"><span class="hs-identifier hs-type">txtPrinter</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#TextDetails"><span class="hs-identifier hs-type">TextDetails</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-937"></span><span id="txtPrinter"><span class="annot"><span class="annottext">txtPrinter :: TextDetails -&gt; ShowS
</span><a href="GHC.Utils.Ppr.html#txtPrinter"><span class="hs-identifier hs-var hs-var">txtPrinter</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Chr"><span class="hs-identifier hs-type">Chr</span></a></span><span> </span><span id="local-6989586621680783463"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621680783463"><span class="hs-identifier hs-var">c</span></a></span></span><span class="hs-special">)</span><span>    </span><span id="local-6989586621680783462"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680783462"><span class="hs-identifier hs-var">s</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621680783463"><span class="hs-identifier hs-var">c</span></a></span><span class="annot"><span class="annottext">Char -&gt; ShowS
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680783462"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-938"></span><span class="annot"><a href="GHC.Utils.Ppr.html#txtPrinter"><span class="hs-identifier hs-var">txtPrinter</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Str"><span class="hs-identifier hs-type">Str</span></a></span><span> </span><span id="local-6989586621680783461"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680783461"><span class="hs-identifier hs-var">s1</span></a></span></span><span class="hs-special">)</span><span>   </span><span id="local-6989586621680783460"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680783460"><span class="hs-identifier hs-var">s2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680783461"><span class="hs-identifier hs-var">s1</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680783460"><span class="hs-identifier hs-var">s2</span></a></span><span>
</span><span id="line-939"></span><span class="annot"><a href="GHC.Utils.Ppr.html#txtPrinter"><span class="hs-identifier hs-var">txtPrinter</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#PStr"><span class="hs-identifier hs-type">PStr</span></a></span><span> </span><span id="local-6989586621680783459"><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680783459"><span class="hs-identifier hs-var">s1</span></a></span></span><span class="hs-special">)</span><span>  </span><span id="local-6989586621680783458"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680783458"><span class="hs-identifier hs-var">s2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FastString -&gt; String
</span><a href="GHC.Data.FastString.html#unpackFS"><span class="hs-identifier hs-var">unpackFS</span></a></span><span> </span><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680783459"><span class="hs-identifier hs-var">s1</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680783458"><span class="hs-identifier hs-var">s2</span></a></span><span>
</span><span id="line-940"></span><span class="annot"><a href="GHC.Utils.Ppr.html#txtPrinter"><span class="hs-identifier hs-var">txtPrinter</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#ZStr"><span class="hs-identifier hs-type">ZStr</span></a></span><span> </span><span id="local-6989586621680783456"><span class="annot"><span class="annottext">FastZString
</span><a href="#local-6989586621680783456"><span class="hs-identifier hs-var">s1</span></a></span></span><span class="hs-special">)</span><span>  </span><span id="local-6989586621680783455"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680783455"><span class="hs-identifier hs-var">s2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FastZString -&gt; String
</span><a href="GHC.Data.FastString.html#zString"><span class="hs-identifier hs-var">zString</span></a></span><span> </span><span class="annot"><span class="annottext">FastZString
</span><a href="#local-6989586621680783456"><span class="hs-identifier hs-var">s1</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680783455"><span class="hs-identifier hs-var">s2</span></a></span><span>
</span><span id="line-941"></span><span class="annot"><a href="GHC.Utils.Ppr.html#txtPrinter"><span class="hs-identifier hs-var">txtPrinter</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#LStr"><span class="hs-identifier hs-type">LStr</span></a></span><span> </span><span id="local-6989586621680783453"><span class="annot"><span class="annottext">PtrString
</span><a href="#local-6989586621680783453"><span class="hs-identifier hs-var">s1</span></a></span></span><span class="hs-special">)</span><span>  </span><span id="local-6989586621680783452"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680783452"><span class="hs-identifier hs-var">s2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PtrString -&gt; String
</span><a href="GHC.Data.FastString.html#unpackPtrString"><span class="hs-identifier hs-var">unpackPtrString</span></a></span><span> </span><span class="annot"><span class="annottext">PtrString
</span><a href="#local-6989586621680783453"><span class="hs-identifier hs-var">s1</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680783452"><span class="hs-identifier hs-var">s2</span></a></span><span>
</span><span id="line-942"></span><span class="annot"><a href="GHC.Utils.Ppr.html#txtPrinter"><span class="hs-identifier hs-var">txtPrinter</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#RStr"><span class="hs-identifier hs-type">RStr</span></a></span><span> </span><span id="local-6989586621680783450"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783450"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621680783449"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621680783449"><span class="hs-identifier hs-var">c</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680783448"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680783448"><span class="hs-identifier hs-var">s2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Char -&gt; String
forall a. Int -&gt; a -&gt; [a]
</span><a href="../../base/src/GHC.List.html#replicate"><span class="hs-identifier hs-var">replicate</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783450"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621680783449"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680783448"><span class="hs-identifier hs-var">s2</span></a></span><span>
</span><span id="line-943"></span><span>
</span><span id="line-944"></span><span class="hs-comment">-- | The general rendering interface.</span><span>
</span><span id="line-945"></span><span id="local-6989586621680784068"><span class="annot"><a href="GHC.Utils.Ppr.html#fullRender"><span class="hs-identifier hs-type">fullRender</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Mode"><span class="hs-identifier hs-type">Mode</span></a></span><span>                     </span><span class="hs-comment">-- ^ Rendering mode</span><span>
</span><span id="line-946"></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>                      </span><span class="hs-comment">-- ^ Line length</span><span>
</span><span id="line-947"></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Float</span></span><span>                    </span><span class="hs-comment">-- ^ Ribbons per line</span><span>
</span><span id="line-948"></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#TextDetails"><span class="hs-identifier hs-type">TextDetails</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680784068"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680784068"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span>  </span><span class="hs-comment">-- ^ What to do with text</span><span>
</span><span id="line-949"></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680784068"><span class="hs-identifier hs-type">a</span></a></span><span>                        </span><span class="hs-comment">-- ^ What to do at the end</span><span>
</span><span id="line-950"></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span>                      </span><span class="hs-comment">-- ^ The document</span><span>
</span><span id="line-951"></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680784068"><span class="hs-identifier hs-type">a</span></a></span></span><span>                        </span><span class="hs-comment">-- ^ Result</span><span>
</span><span id="line-952"></span><span id="fullRender"><span class="annot"><span class="annottext">fullRender :: forall a.
Mode -&gt; Int -&gt; Float -&gt; (TextDetails -&gt; a -&gt; a) -&gt; a -&gt; Doc -&gt; a
</span><a href="GHC.Utils.Ppr.html#fullRender"><span class="hs-identifier hs-var hs-var">fullRender</span></a></span></span><span> </span><span class="annot"><span class="annottext">Mode
</span><a href="GHC.Utils.Ppr.html#OneLineMode"><span class="hs-identifier hs-var">OneLineMode</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Float
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680783437"><span class="annot"><span class="annottext">TextDetails -&gt; a -&gt; a
</span><a href="#local-6989586621680783437"><span class="hs-identifier hs-var">txt</span></a></span></span><span> </span><span id="local-6989586621680783436"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680783436"><span class="hs-identifier hs-var">end</span></a></span></span><span> </span><span id="local-6989586621680783435"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783435"><span class="hs-identifier hs-var">doc</span></a></span></span><span>
</span><span id="line-953"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TextDetails
-&gt; (Doc -&gt; Doc -&gt; Doc) -&gt; (TextDetails -&gt; a -&gt; a) -&gt; a -&gt; Doc -&gt; a
forall a.
TextDetails
-&gt; (Doc -&gt; Doc -&gt; Doc) -&gt; (TextDetails -&gt; a -&gt; a) -&gt; a -&gt; Doc -&gt; a
</span><a href="GHC.Utils.Ppr.html#easyDisplay"><span class="hs-identifier hs-var">easyDisplay</span></a></span><span> </span><span class="annot"><span class="annottext">TextDetails
</span><a href="GHC.Utils.Ppr.html#spaceText"><span class="hs-identifier hs-var">spaceText</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="annot"><span class="annottext">Doc
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680783433"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783433"><span class="hs-identifier hs-var">y</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783433"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">TextDetails -&gt; a -&gt; a
</span><a href="#local-6989586621680783437"><span class="hs-identifier hs-var">txt</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680783436"><span class="hs-identifier hs-var">end</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#reduceDoc"><span class="hs-identifier hs-var">reduceDoc</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783435"><span class="hs-identifier hs-var">doc</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-954"></span><span class="annot"><a href="GHC.Utils.Ppr.html#fullRender"><span class="hs-identifier hs-var">fullRender</span></a></span><span> </span><span class="annot"><span class="annottext">Mode
</span><a href="GHC.Utils.Ppr.html#LeftMode"><span class="hs-identifier hs-var">LeftMode</span></a></span><span>    </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Float
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680783432"><span class="annot"><span class="annottext">TextDetails -&gt; a -&gt; a
</span><a href="#local-6989586621680783432"><span class="hs-identifier hs-var">txt</span></a></span></span><span> </span><span id="local-6989586621680783431"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680783431"><span class="hs-identifier hs-var">end</span></a></span></span><span> </span><span id="local-6989586621680783430"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783430"><span class="hs-identifier hs-var">doc</span></a></span></span><span>
</span><span id="line-955"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TextDetails
-&gt; (Doc -&gt; Doc -&gt; Doc) -&gt; (TextDetails -&gt; a -&gt; a) -&gt; a -&gt; Doc -&gt; a
forall a.
TextDetails
-&gt; (Doc -&gt; Doc -&gt; Doc) -&gt; (TextDetails -&gt; a -&gt; a) -&gt; a -&gt; Doc -&gt; a
</span><a href="GHC.Utils.Ppr.html#easyDisplay"><span class="hs-identifier hs-var">easyDisplay</span></a></span><span> </span><span class="annot"><span class="annottext">TextDetails
</span><a href="GHC.Utils.Ppr.html#nlText"><span class="hs-identifier hs-var">nlText</span></a></span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#first"><span class="hs-identifier hs-var">first</span></a></span><span> </span><span class="annot"><span class="annottext">TextDetails -&gt; a -&gt; a
</span><a href="#local-6989586621680783432"><span class="hs-identifier hs-var">txt</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680783431"><span class="hs-identifier hs-var">end</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#reduceDoc"><span class="hs-identifier hs-var">reduceDoc</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783430"><span class="hs-identifier hs-var">doc</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-956"></span><span>
</span><span id="line-957"></span><span class="annot"><a href="GHC.Utils.Ppr.html#fullRender"><span class="hs-identifier hs-var">fullRender</span></a></span><span> </span><span id="local-6989586621680783429"><span class="annot"><span class="annottext">Mode
</span><a href="#local-6989586621680783429"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span id="local-6989586621680783428"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783428"><span class="hs-identifier hs-var">lineLen</span></a></span></span><span> </span><span id="local-6989586621680783427"><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621680783427"><span class="hs-identifier hs-var">ribbons</span></a></span></span><span> </span><span id="local-6989586621680783426"><span class="annot"><span class="annottext">TextDetails -&gt; a -&gt; a
</span><a href="#local-6989586621680783426"><span class="hs-identifier hs-var">txt</span></a></span></span><span> </span><span id="local-6989586621680783425"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680783425"><span class="hs-identifier hs-var">rest</span></a></span></span><span> </span><span id="local-6989586621680783424"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783424"><span class="hs-identifier hs-var">doc</span></a></span></span><span>
</span><span id="line-958"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Mode -&gt; Int -&gt; Int -&gt; (TextDetails -&gt; a -&gt; a) -&gt; a -&gt; Doc -&gt; a
forall a.
Mode -&gt; Int -&gt; Int -&gt; (TextDetails -&gt; a -&gt; a) -&gt; a -&gt; Doc -&gt; a
</span><a href="GHC.Utils.Ppr.html#display"><span class="hs-identifier hs-var">display</span></a></span><span> </span><span class="annot"><span class="annottext">Mode
</span><a href="#local-6989586621680783429"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783428"><span class="hs-identifier hs-var">lineLen</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783422"><span class="hs-identifier hs-var">ribbonLen</span></a></span><span> </span><span class="annot"><span class="annottext">TextDetails -&gt; a -&gt; a
</span><a href="#local-6989586621680783426"><span class="hs-identifier hs-var">txt</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680783425"><span class="hs-identifier hs-var">rest</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783421"><span class="hs-identifier hs-var">doc'</span></a></span><span>
</span><span id="line-959"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-960"></span><span>    </span><span id="local-6989586621680783421"><span class="annot"><span class="annottext">doc' :: Doc
</span><a href="#local-6989586621680783421"><span class="hs-identifier hs-var hs-var">doc'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#best"><span class="hs-identifier hs-var">best</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783420"><span class="hs-identifier hs-var">bestLineLen</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783422"><span class="hs-identifier hs-var">ribbonLen</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#reduceDoc"><span class="hs-identifier hs-var">reduceDoc</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783424"><span class="hs-identifier hs-var">doc</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-961"></span><span>
</span><span id="line-962"></span><span>    </span><span class="annot"><a href="#local-6989586621680783420"><span class="hs-identifier hs-type">bestLineLen</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="#local-6989586621680783422"><span class="hs-identifier hs-type">ribbonLen</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>
</span><span id="line-963"></span><span>    </span><span id="local-6989586621680783422"><span class="annot"><span class="annottext">ribbonLen :: Int
</span><a href="#local-6989586621680783422"><span class="hs-identifier hs-var hs-var">ribbonLen</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Float -&gt; Int
forall a b. (RealFrac a, Integral b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#round"><span class="hs-identifier hs-var">round</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Float
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783428"><span class="hs-identifier hs-var">lineLen</span></a></span><span> </span><span class="annot"><span class="annottext">Float -&gt; Float -&gt; Float
forall a. Fractional a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Real.html#%2F"><span class="hs-operator hs-var">/</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621680783427"><span class="hs-identifier hs-var">ribbons</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-964"></span><span>    </span><span id="local-6989586621680783420"><span class="annot"><span class="annottext">bestLineLen :: Int
</span><a href="#local-6989586621680783420"><span class="hs-identifier hs-var hs-var">bestLineLen</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Mode
</span><a href="#local-6989586621680783429"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-965"></span><span>                      </span><span class="annot"><span class="annottext">Mode
</span><a href="GHC.Utils.Ppr.html#ZigZagMode"><span class="hs-identifier hs-var">ZigZagMode</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int
forall a. Bounded a =&gt; a
</span><a href="../../base/src/GHC.Enum.html#maxBound"><span class="hs-identifier hs-var">maxBound</span></a></span><span>
</span><span id="line-966"></span><span>                      </span><span class="annot"><span class="annottext">Mode
</span><span class="hs-identifier">_</span></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783428"><span class="hs-identifier hs-var">lineLen</span></a></span><span>
</span><span id="line-967"></span><span>
</span><span id="line-968"></span><span id="local-6989586621680784032"><span class="annot"><a href="GHC.Utils.Ppr.html#easyDisplay"><span class="hs-identifier hs-type">easyDisplay</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#TextDetails"><span class="hs-identifier hs-type">TextDetails</span></a></span><span>
</span><span id="line-969"></span><span>             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-970"></span><span>             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#TextDetails"><span class="hs-identifier hs-type">TextDetails</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680784032"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680784032"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-971"></span><span>             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680784032"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-972"></span><span>             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span>
</span><span id="line-973"></span><span>             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680784032"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-974"></span><span id="easyDisplay"><span class="annot"><span class="annottext">easyDisplay :: forall a.
TextDetails
-&gt; (Doc -&gt; Doc -&gt; Doc) -&gt; (TextDetails -&gt; a -&gt; a) -&gt; a -&gt; Doc -&gt; a
</span><a href="GHC.Utils.Ppr.html#easyDisplay"><span class="hs-identifier hs-var hs-var">easyDisplay</span></a></span></span><span> </span><span id="local-6989586621680783416"><span class="annot"><span class="annottext">TextDetails
</span><a href="#local-6989586621680783416"><span class="hs-identifier hs-var">nlSpaceText</span></a></span></span><span> </span><span id="local-6989586621680783415"><span class="annot"><span class="annottext">Doc -&gt; Doc -&gt; Doc
</span><a href="#local-6989586621680783415"><span class="hs-identifier hs-var">choose</span></a></span></span><span> </span><span id="local-6989586621680783414"><span class="annot"><span class="annottext">TextDetails -&gt; a -&gt; a
</span><a href="#local-6989586621680783414"><span class="hs-identifier hs-var">txt</span></a></span></span><span> </span><span id="local-6989586621680783413"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680783413"><span class="hs-identifier hs-var">end</span></a></span></span><span>
</span><span id="line-975"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc -&gt; a
</span><a href="#local-6989586621680783412"><span class="hs-identifier hs-var">lay</span></a></span><span>
</span><span id="line-976"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-977"></span><span>    </span><span id="local-6989586621680783412"><span class="annot"><span class="annottext">lay :: Doc -&gt; a
</span><a href="#local-6989586621680783412"><span class="hs-identifier hs-var hs-var">lay</span></a></span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#NoDoc"><span class="hs-identifier hs-var">NoDoc</span></a></span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; a
forall a. String -&gt; a
</span><a href="GHC.Utils.Ppr.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;easyDisplay: NoDoc&quot;</span></span><span>
</span><span id="line-978"></span><span>    </span><span class="annot"><a href="#local-6989586621680783412"><span class="hs-identifier hs-var">lay</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Union"><span class="hs-identifier hs-type">Union</span></a></span><span> </span><span id="local-6989586621680783411"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783411"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621680783410"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783410"><span class="hs-identifier hs-var">q</span></a></span></span><span class="hs-special">)</span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc -&gt; a
</span><a href="#local-6989586621680783412"><span class="hs-identifier hs-var">lay</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Doc -&gt; Doc -&gt; Doc
</span><a href="#local-6989586621680783415"><span class="hs-identifier hs-var">choose</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783411"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783410"><span class="hs-identifier hs-var">q</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-979"></span><span>    </span><span class="annot"><a href="#local-6989586621680783412"><span class="hs-identifier hs-var">lay</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Nest"><span class="hs-identifier hs-type">Nest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680783409"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783409"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">)</span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc -&gt; a
</span><a href="#local-6989586621680783412"><span class="hs-identifier hs-var">lay</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783409"><span class="hs-identifier hs-var">p</span></a></span><span>
</span><span id="line-980"></span><span>    </span><span class="annot"><a href="#local-6989586621680783412"><span class="hs-identifier hs-var">lay</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680783413"><span class="hs-identifier hs-var">end</span></a></span><span>
</span><span id="line-981"></span><span>    </span><span class="annot"><a href="#local-6989586621680783412"><span class="hs-identifier hs-var">lay</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#NilAbove"><span class="hs-identifier hs-type">NilAbove</span></a></span><span> </span><span id="local-6989586621680783408"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783408"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">)</span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TextDetails
</span><a href="#local-6989586621680783416"><span class="hs-identifier hs-var">nlSpaceText</span></a></span><span> </span><span class="annot"><span class="annottext">TextDetails -&gt; a -&gt; a
</span><a href="#local-6989586621680783414"><span class="hs-operator hs-var">`txt`</span></a></span><span> </span><span class="annot"><span class="annottext">Doc -&gt; a
</span><a href="#local-6989586621680783412"><span class="hs-identifier hs-var">lay</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783408"><span class="hs-identifier hs-var">p</span></a></span><span>
</span><span id="line-982"></span><span>    </span><span class="annot"><a href="#local-6989586621680783412"><span class="hs-identifier hs-var">lay</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#TextBeside"><span class="hs-identifier hs-type">TextBeside</span></a></span><span> </span><span id="local-6989586621680783407"><span class="annot"><span class="annottext">TextDetails
</span><a href="#local-6989586621680783407"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680783406"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783406"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TextDetails
</span><a href="#local-6989586621680783407"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">TextDetails -&gt; a -&gt; a
</span><a href="#local-6989586621680783414"><span class="hs-operator hs-var">`txt`</span></a></span><span> </span><span class="annot"><span class="annottext">Doc -&gt; a
</span><a href="#local-6989586621680783412"><span class="hs-identifier hs-var">lay</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783406"><span class="hs-identifier hs-var">p</span></a></span><span>
</span><span id="line-983"></span><span>    </span><span class="annot"><a href="#local-6989586621680783412"><span class="hs-identifier hs-var">lay</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Above"><span class="hs-identifier hs-type">Above</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; a
forall a. String -&gt; a
</span><a href="GHC.Utils.Ppr.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;easyDisplay Above&quot;</span></span><span>
</span><span id="line-984"></span><span>    </span><span class="annot"><a href="#local-6989586621680783412"><span class="hs-identifier hs-var">lay</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Beside"><span class="hs-identifier hs-type">Beside</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; a
forall a. String -&gt; a
</span><a href="GHC.Utils.Ppr.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;easyDisplay Beside&quot;</span></span><span>
</span><span id="line-985"></span><span>
</span><span id="line-986"></span><span id="local-6989586621680784031"><span class="annot"><a href="GHC.Utils.Ppr.html#display"><span class="hs-identifier hs-type">display</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Mode"><span class="hs-identifier hs-type">Mode</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#TextDetails"><span class="hs-identifier hs-type">TextDetails</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680784031"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680784031"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680784031"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680784031"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-987"></span><span id="display"><span class="annot"><span class="annottext">display :: forall a.
Mode -&gt; Int -&gt; Int -&gt; (TextDetails -&gt; a -&gt; a) -&gt; a -&gt; Doc -&gt; a
</span><a href="GHC.Utils.Ppr.html#display"><span class="hs-identifier hs-var hs-var">display</span></a></span></span><span> </span><span id="local-6989586621680783402"><span class="annot"><span class="annottext">Mode
</span><a href="#local-6989586621680783402"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621680783401"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783401"><span class="hs-identifier hs-var">page_width</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621680783400"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783400"><span class="hs-identifier hs-var">ribbon_width</span></a></span></span><span> </span><span id="local-6989586621680783399"><span class="annot"><span class="annottext">TextDetails -&gt; a -&gt; a
</span><a href="#local-6989586621680783399"><span class="hs-identifier hs-var">txt</span></a></span></span><span> </span><span id="local-6989586621680783398"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680783398"><span class="hs-identifier hs-var">end</span></a></span></span><span> </span><span id="local-6989586621680783397"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783397"><span class="hs-identifier hs-var">doc</span></a></span></span><span>
</span><span id="line-988"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783401"><span class="hs-identifier hs-var">page_width</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783400"><span class="hs-identifier hs-var">ribbon_width</span></a></span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621680783396"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783396"><span class="hs-identifier hs-var">gap_width</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-989"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783396"><span class="hs-identifier hs-var">gap_width</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Integral a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Real.html#quot"><span class="hs-operator hs-var">`quot`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621680783394"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783394"><span class="hs-identifier hs-var">shift</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-990"></span><span>    </span><span class="hs-keyword">let</span><span>
</span><span id="line-991"></span><span>        </span><span id="local-6989586621680783382"><span class="annot"><span class="annottext">lay :: Int -&gt; Doc -&gt; a
</span><a href="#local-6989586621680783382"><span class="hs-identifier hs-var hs-var">lay</span></a></span></span><span> </span><span id="local-6989586621680783381"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783381"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><span class="hs-identifier">_</span></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783381"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">`seq`</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a
forall a. HasCallStack =&gt; a
</span><a href="../../base/src/GHC.Err.html#undefined"><span class="hs-identifier hs-var">undefined</span></a></span><span>
</span><span id="line-992"></span><span>        </span><span class="annot"><a href="#local-6989586621680783382"><span class="hs-identifier hs-var">lay</span></a></span><span> </span><span id="local-6989586621680783380"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783380"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Nest"><span class="hs-identifier hs-type">Nest</span></a></span><span> </span><span id="local-6989586621680783379"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783379"><span class="hs-identifier hs-var">k1</span></a></span></span><span> </span><span id="local-6989586621680783378"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783378"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Doc -&gt; a
</span><a href="#local-6989586621680783382"><span class="hs-identifier hs-var">lay</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783380"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783379"><span class="hs-identifier hs-var">k1</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783378"><span class="hs-identifier hs-var">p</span></a></span><span>
</span><span id="line-993"></span><span>        </span><span class="annot"><a href="#local-6989586621680783382"><span class="hs-identifier hs-var">lay</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680783398"><span class="hs-identifier hs-var">end</span></a></span><span>
</span><span id="line-994"></span><span>        </span><span class="annot"><a href="#local-6989586621680783382"><span class="hs-identifier hs-var">lay</span></a></span><span> </span><span id="local-6989586621680783377"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783377"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#NilAbove"><span class="hs-identifier hs-type">NilAbove</span></a></span><span> </span><span id="local-6989586621680783376"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783376"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TextDetails
</span><a href="GHC.Utils.Ppr.html#nlText"><span class="hs-identifier hs-var">nlText</span></a></span><span> </span><span class="annot"><span class="annottext">TextDetails -&gt; a -&gt; a
</span><a href="#local-6989586621680783399"><span class="hs-operator hs-var">`txt`</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Doc -&gt; a
</span><a href="#local-6989586621680783382"><span class="hs-identifier hs-var">lay</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783377"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783376"><span class="hs-identifier hs-var">p</span></a></span><span>
</span><span id="line-995"></span><span>        </span><span class="annot"><a href="#local-6989586621680783382"><span class="hs-identifier hs-var">lay</span></a></span><span> </span><span id="local-6989586621680783375"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783375"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#TextBeside"><span class="hs-identifier hs-type">TextBeside</span></a></span><span> </span><span id="local-6989586621680783374"><span class="annot"><span class="annottext">TextDetails
</span><a href="#local-6989586621680783374"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span id="local-6989586621680783373"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783373"><span class="hs-identifier hs-var">sl</span></a></span></span><span> </span><span id="local-6989586621680783372"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783372"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-996"></span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Mode
</span><a href="#local-6989586621680783402"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-997"></span><span>                    </span><span class="annot"><span class="annottext">Mode
</span><a href="GHC.Utils.Ppr.html#ZigZagMode"><span class="hs-identifier hs-var">ZigZagMode</span></a></span><span> </span><span class="hs-glyph">|</span><span>  </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783375"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;=</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783396"><span class="hs-identifier hs-var">gap_width</span></a></span><span>
</span><span id="line-998"></span><span>                               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">TextDetails
</span><a href="GHC.Utils.Ppr.html#nlText"><span class="hs-identifier hs-var">nlText</span></a></span><span> </span><span class="annot"><span class="annottext">TextDetails -&gt; a -&gt; a
</span><a href="#local-6989586621680783399"><span class="hs-operator hs-var">`txt`</span></a></span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-999"></span><span>                                  </span><span class="annot"><span class="annottext">String -&gt; TextDetails
</span><a href="GHC.Utils.Ppr.html#Str"><span class="hs-identifier hs-var">Str</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Char -&gt; String
forall a. Int -&gt; a -&gt; [a]
</span><a href="../../base/src/GHC.List.html#replicate"><span class="hs-identifier hs-var">replicate</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783394"><span class="hs-identifier hs-var">shift</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'/'</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">TextDetails -&gt; a -&gt; a
</span><a href="#local-6989586621680783399"><span class="hs-operator hs-var">`txt`</span></a></span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-1000"></span><span>                                  </span><span class="annot"><span class="annottext">TextDetails
</span><a href="GHC.Utils.Ppr.html#nlText"><span class="hs-identifier hs-var">nlText</span></a></span><span> </span><span class="annot"><span class="annottext">TextDetails -&gt; a -&gt; a
</span><a href="#local-6989586621680783399"><span class="hs-operator hs-var">`txt`</span></a></span><span>
</span><span id="line-1001"></span><span>                                  </span><span class="annot"><span class="annottext">Int -&gt; TextDetails -&gt; Int -&gt; Doc -&gt; a
</span><a href="#local-6989586621680783371"><span class="hs-identifier hs-var">lay1</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783375"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783394"><span class="hs-identifier hs-var">shift</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">TextDetails
</span><a href="#local-6989586621680783374"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783373"><span class="hs-identifier hs-var">sl</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783372"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1002"></span><span>
</span><span id="line-1003"></span><span>                               </span><span class="hs-glyph">|</span><span>  </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783375"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-1004"></span><span>                               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">TextDetails
</span><a href="GHC.Utils.Ppr.html#nlText"><span class="hs-identifier hs-var">nlText</span></a></span><span> </span><span class="annot"><span class="annottext">TextDetails -&gt; a -&gt; a
</span><a href="#local-6989586621680783399"><span class="hs-operator hs-var">`txt`</span></a></span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-1005"></span><span>                                  </span><span class="annot"><span class="annottext">String -&gt; TextDetails
</span><a href="GHC.Utils.Ppr.html#Str"><span class="hs-identifier hs-var">Str</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Char -&gt; String
forall a. Int -&gt; a -&gt; [a]
</span><a href="../../base/src/GHC.List.html#replicate"><span class="hs-identifier hs-var">replicate</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783394"><span class="hs-identifier hs-var">shift</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\\'</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">TextDetails -&gt; a -&gt; a
</span><a href="#local-6989586621680783399"><span class="hs-operator hs-var">`txt`</span></a></span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-1006"></span><span>                                  </span><span class="annot"><span class="annottext">TextDetails
</span><a href="GHC.Utils.Ppr.html#nlText"><span class="hs-identifier hs-var">nlText</span></a></span><span> </span><span class="annot"><span class="annottext">TextDetails -&gt; a -&gt; a
</span><a href="#local-6989586621680783399"><span class="hs-operator hs-var">`txt`</span></a></span><span>
</span><span id="line-1007"></span><span>                                  </span><span class="annot"><span class="annottext">Int -&gt; TextDetails -&gt; Int -&gt; Doc -&gt; a
</span><a href="#local-6989586621680783371"><span class="hs-identifier hs-var">lay1</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783375"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783394"><span class="hs-identifier hs-var">shift</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">TextDetails
</span><a href="#local-6989586621680783374"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783373"><span class="hs-identifier hs-var">sl</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783372"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1008"></span><span>
</span><span id="line-1009"></span><span>                    </span><span class="annot"><span class="annottext">Mode
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int -&gt; TextDetails -&gt; Int -&gt; Doc -&gt; a
</span><a href="#local-6989586621680783371"><span class="hs-identifier hs-var">lay1</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783375"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">TextDetails
</span><a href="#local-6989586621680783374"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783373"><span class="hs-identifier hs-var">sl</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783372"><span class="hs-identifier hs-var">p</span></a></span><span>
</span><span id="line-1010"></span><span>        </span><span class="annot"><a href="#local-6989586621680783382"><span class="hs-identifier hs-var">lay</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Above"><span class="hs-identifier hs-type">Above</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; a
forall a. String -&gt; a
</span><a href="GHC.Utils.Ppr.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;display lay Above&quot;</span></span><span>
</span><span id="line-1011"></span><span>        </span><span class="annot"><a href="#local-6989586621680783382"><span class="hs-identifier hs-var">lay</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Beside"><span class="hs-identifier hs-type">Beside</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; a
forall a. String -&gt; a
</span><a href="GHC.Utils.Ppr.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;display lay Beside&quot;</span></span><span>
</span><span id="line-1012"></span><span>        </span><span class="annot"><a href="#local-6989586621680783382"><span class="hs-identifier hs-var">lay</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#NoDoc"><span class="hs-identifier hs-var">NoDoc</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; a
forall a. String -&gt; a
</span><a href="GHC.Utils.Ppr.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;display lay NoDoc&quot;</span></span><span>
</span><span id="line-1013"></span><span>        </span><span class="annot"><a href="#local-6989586621680783382"><span class="hs-identifier hs-var">lay</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Union"><span class="hs-identifier hs-type">Union</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; a
forall a. String -&gt; a
</span><a href="GHC.Utils.Ppr.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;display lay Union&quot;</span></span><span>
</span><span id="line-1014"></span><span>
</span><span id="line-1015"></span><span>        </span><span id="local-6989586621680783371"><span class="annot"><span class="annottext">lay1 :: Int -&gt; TextDetails -&gt; Int -&gt; Doc -&gt; a
</span><a href="#local-6989586621680783371"><span class="hs-identifier hs-var hs-var">lay1</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621680783370"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783370"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span id="local-6989586621680783369"><span class="annot"><span class="annottext">TextDetails
</span><a href="#local-6989586621680783369"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621680783368"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783368"><span class="hs-identifier hs-var">sl</span></a></span></span><span> </span><span id="local-6989586621680783367"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783367"><span class="hs-identifier hs-var">p</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621680783365"><span class="annot"><span class="annottext">r :: Int
</span><a href="#local-6989586621680783365"><span class="hs-identifier hs-var hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783370"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783368"><span class="hs-identifier hs-var">sl</span></a></span><span>
</span><span id="line-1016"></span><span>                             </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">Int -&gt; a -&gt; a
</span><a href="#local-6989586621680783364"><span class="hs-identifier hs-var">indent</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783370"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TextDetails
</span><a href="#local-6989586621680783369"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">TextDetails -&gt; a -&gt; a
</span><a href="#local-6989586621680783399"><span class="hs-operator hs-var">`txt`</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Doc -&gt; a
</span><a href="#local-6989586621680783363"><span class="hs-identifier hs-var">lay2</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783365"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783367"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1017"></span><span>
</span><span id="line-1018"></span><span>        </span><span id="local-6989586621680783363"><span class="annot"><span class="annottext">lay2 :: Int -&gt; Doc -&gt; a
</span><a href="#local-6989586621680783363"><span class="hs-identifier hs-var hs-var">lay2</span></a></span></span><span> </span><span id="local-6989586621680783362"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783362"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783362"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">`seq`</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a
forall a. HasCallStack =&gt; a
</span><a href="../../base/src/GHC.Err.html#undefined"><span class="hs-identifier hs-var">undefined</span></a></span><span>
</span><span id="line-1019"></span><span>        </span><span class="annot"><a href="#local-6989586621680783363"><span class="hs-identifier hs-var">lay2</span></a></span><span> </span><span id="local-6989586621680783361"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783361"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#NilAbove"><span class="hs-identifier hs-type">NilAbove</span></a></span><span> </span><span id="local-6989586621680783360"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783360"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">)</span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TextDetails
</span><a href="GHC.Utils.Ppr.html#nlText"><span class="hs-identifier hs-var">nlText</span></a></span><span> </span><span class="annot"><span class="annottext">TextDetails -&gt; a -&gt; a
</span><a href="#local-6989586621680783399"><span class="hs-operator hs-var">`txt`</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Doc -&gt; a
</span><a href="#local-6989586621680783382"><span class="hs-identifier hs-var">lay</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783361"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783360"><span class="hs-identifier hs-var">p</span></a></span><span>
</span><span id="line-1020"></span><span>        </span><span class="annot"><a href="#local-6989586621680783363"><span class="hs-identifier hs-var">lay2</span></a></span><span> </span><span id="local-6989586621680783359"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783359"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#TextBeside"><span class="hs-identifier hs-type">TextBeside</span></a></span><span> </span><span id="local-6989586621680783358"><span class="annot"><span class="annottext">TextDetails
</span><a href="#local-6989586621680783358"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span id="local-6989586621680783357"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783357"><span class="hs-identifier hs-var">sl</span></a></span></span><span> </span><span id="local-6989586621680783356"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783356"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TextDetails
</span><a href="#local-6989586621680783358"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">TextDetails -&gt; a -&gt; a
</span><a href="#local-6989586621680783399"><span class="hs-operator hs-var">`txt`</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Doc -&gt; a
</span><a href="#local-6989586621680783363"><span class="hs-identifier hs-var">lay2</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783359"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783357"><span class="hs-identifier hs-var">sl</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783356"><span class="hs-identifier hs-var">p</span></a></span><span>
</span><span id="line-1021"></span><span>        </span><span class="annot"><a href="#local-6989586621680783363"><span class="hs-identifier hs-var">lay2</span></a></span><span> </span><span id="local-6989586621680783355"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783355"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Nest"><span class="hs-identifier hs-type">Nest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680783354"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783354"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">)</span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Doc -&gt; a
</span><a href="#local-6989586621680783363"><span class="hs-identifier hs-var">lay2</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783355"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783354"><span class="hs-identifier hs-var">p</span></a></span><span>
</span><span id="line-1022"></span><span>        </span><span class="annot"><a href="#local-6989586621680783363"><span class="hs-identifier hs-var">lay2</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680783398"><span class="hs-identifier hs-var">end</span></a></span><span>
</span><span id="line-1023"></span><span>        </span><span class="annot"><a href="#local-6989586621680783363"><span class="hs-identifier hs-var">lay2</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Above"><span class="hs-identifier hs-type">Above</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; a
forall a. String -&gt; a
</span><a href="GHC.Utils.Ppr.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;display lay2 Above&quot;</span></span><span>
</span><span id="line-1024"></span><span>        </span><span class="annot"><a href="#local-6989586621680783363"><span class="hs-identifier hs-var">lay2</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Beside"><span class="hs-identifier hs-type">Beside</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; a
forall a. String -&gt; a
</span><a href="GHC.Utils.Ppr.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;display lay2 Beside&quot;</span></span><span>
</span><span id="line-1025"></span><span>        </span><span class="annot"><a href="#local-6989586621680783363"><span class="hs-identifier hs-var">lay2</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#NoDoc"><span class="hs-identifier hs-var">NoDoc</span></a></span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; a
forall a. String -&gt; a
</span><a href="GHC.Utils.Ppr.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;display lay2 NoDoc&quot;</span></span><span>
</span><span id="line-1026"></span><span>        </span><span class="annot"><a href="#local-6989586621680783363"><span class="hs-identifier hs-var">lay2</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Union"><span class="hs-identifier hs-type">Union</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; a
forall a. String -&gt; a
</span><a href="GHC.Utils.Ppr.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;display lay2 Union&quot;</span></span><span>
</span><span id="line-1027"></span><span>
</span><span id="line-1028"></span><span>        </span><span id="local-6989586621680783364"><span class="annot"><span class="annottext">indent :: Int -&gt; a -&gt; a
</span><a href="#local-6989586621680783364"><span class="hs-identifier hs-var hs-var">indent</span></a></span></span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621680783353"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783353"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621680783352"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680783352"><span class="hs-identifier hs-var">r</span></a></span></span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Char -&gt; TextDetails
</span><a href="GHC.Utils.Ppr.html#RStr"><span class="hs-identifier hs-var">RStr</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783353"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">' '</span></span><span> </span><span class="annot"><span class="annottext">TextDetails -&gt; a -&gt; a
</span><a href="#local-6989586621680783399"><span class="hs-operator hs-var">`txt`</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680783352"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-1029"></span><span>    </span><span class="hs-keyword">in</span><span>
</span><span id="line-1030"></span><span>    </span><span class="annot"><span class="annottext">Int -&gt; Doc -&gt; a
</span><a href="#local-6989586621680783382"><span class="hs-identifier hs-var">lay</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783397"><span class="hs-identifier hs-var">doc</span></a></span><span>
</span><span id="line-1031"></span><span>    </span><span class="hs-special">}</span><span class="hs-special">}</span><span>
</span><span id="line-1032"></span><span>
</span><span id="line-1033"></span><span class="annot"><a href="GHC.Utils.Ppr.html#printDoc"><span class="hs-identifier hs-type">printDoc</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Mode"><span class="hs-identifier hs-type">Mode</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.Handle.Types.html#Handle"><span class="hs-identifier hs-type">Handle</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-1034"></span><span class="hs-comment">-- printDoc adds a newline to the end</span><span>
</span><span id="line-1035"></span><span id="printDoc"><span class="annot"><span class="annottext">printDoc :: Mode -&gt; Int -&gt; Handle -&gt; Doc -&gt; IO ()
</span><a href="GHC.Utils.Ppr.html#printDoc"><span class="hs-identifier hs-var hs-var">printDoc</span></a></span></span><span> </span><span id="local-6989586621680783351"><span class="annot"><span class="annottext">Mode
</span><a href="#local-6989586621680783351"><span class="hs-identifier hs-var">mode</span></a></span></span><span> </span><span id="local-6989586621680783350"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783350"><span class="hs-identifier hs-var">cols</span></a></span></span><span> </span><span id="local-6989586621680783349"><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621680783349"><span class="hs-identifier hs-var">hdl</span></a></span></span><span> </span><span id="local-6989586621680783348"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783348"><span class="hs-identifier hs-var">doc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Mode -&gt; Int -&gt; Handle -&gt; Doc -&gt; IO ()
</span><a href="GHC.Utils.Ppr.html#printDoc_"><span class="hs-identifier hs-var">printDoc_</span></a></span><span> </span><span class="annot"><span class="annottext">Mode
</span><a href="#local-6989586621680783351"><span class="hs-identifier hs-var">mode</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783350"><span class="hs-identifier hs-var">cols</span></a></span><span> </span><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621680783349"><span class="hs-identifier hs-var">hdl</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783348"><span class="hs-identifier hs-var">doc</span></a></span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-1036"></span><span>
</span><span id="line-1037"></span><span class="annot"><a href="GHC.Utils.Ppr.html#printDoc_"><span class="hs-identifier hs-type">printDoc_</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Mode"><span class="hs-identifier hs-type">Mode</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.Handle.Types.html#Handle"><span class="hs-identifier hs-type">Handle</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-1038"></span><span class="hs-comment">-- printDoc_ does not add a newline at the end, so that</span><span>
</span><span id="line-1039"></span><span class="hs-comment">-- successive calls can output stuff on the same line</span><span>
</span><span id="line-1040"></span><span class="hs-comment">-- Rather like putStr vs putStrLn</span><span>
</span><span id="line-1041"></span><span id="printDoc_"><span class="annot"><span class="annottext">printDoc_ :: Mode -&gt; Int -&gt; Handle -&gt; Doc -&gt; IO ()
</span><a href="GHC.Utils.Ppr.html#printDoc_"><span class="hs-identifier hs-var hs-var">printDoc_</span></a></span></span><span> </span><span class="annot"><span class="annottext">Mode
</span><a href="GHC.Utils.Ppr.html#LeftMode"><span class="hs-identifier hs-var">LeftMode</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680783347"><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621680783347"><span class="hs-identifier hs-var">hdl</span></a></span></span><span> </span><span id="local-6989586621680783346"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783346"><span class="hs-identifier hs-var">doc</span></a></span></span><span>
</span><span id="line-1042"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">Handle -&gt; Doc -&gt; IO ()
</span><a href="GHC.Utils.Ppr.html#printLeftRender"><span class="hs-identifier hs-var">printLeftRender</span></a></span><span> </span><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621680783347"><span class="hs-identifier hs-var">hdl</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783346"><span class="hs-identifier hs-var">doc</span></a></span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Handle -&gt; IO ()
</span><a href="../../base/src/GHC.IO.Handle.html#hFlush"><span class="hs-identifier hs-var">hFlush</span></a></span><span> </span><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621680783347"><span class="hs-identifier hs-var">hdl</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-1043"></span><span class="annot"><a href="GHC.Utils.Ppr.html#printDoc_"><span class="hs-identifier hs-var">printDoc_</span></a></span><span> </span><span id="local-6989586621680783343"><span class="annot"><span class="annottext">Mode
</span><a href="#local-6989586621680783343"><span class="hs-identifier hs-var">mode</span></a></span></span><span> </span><span id="local-6989586621680783342"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783342"><span class="hs-identifier hs-var">pprCols</span></a></span></span><span> </span><span id="local-6989586621680783341"><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621680783341"><span class="hs-identifier hs-var">hdl</span></a></span></span><span> </span><span id="local-6989586621680783340"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783340"><span class="hs-identifier hs-var">doc</span></a></span></span><span>
</span><span id="line-1044"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">Mode
-&gt; Int
-&gt; Float
-&gt; (TextDetails -&gt; IO () -&gt; IO ())
-&gt; IO ()
-&gt; Doc
-&gt; IO ()
forall a.
Mode -&gt; Int -&gt; Float -&gt; (TextDetails -&gt; a -&gt; a) -&gt; a -&gt; Doc -&gt; a
</span><a href="GHC.Utils.Ppr.html#fullRender"><span class="hs-identifier hs-var">fullRender</span></a></span><span> </span><span class="annot"><span class="annottext">Mode
</span><a href="#local-6989586621680783343"><span class="hs-identifier hs-var">mode</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783342"><span class="hs-identifier hs-var">pprCols</span></a></span><span> </span><span class="annot"><span class="annottext">Float
</span><span class="hs-number">1.5</span></span><span> </span><span class="annot"><span class="annottext">TextDetails -&gt; IO () -&gt; IO ()
forall {b}. TextDetails -&gt; IO b -&gt; IO b
</span><a href="#local-6989586621680783339"><span class="hs-identifier hs-var">put</span></a></span><span> </span><span class="annot"><span class="annottext">IO ()
</span><a href="#local-6989586621680783338"><span class="hs-identifier hs-var">done</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783340"><span class="hs-identifier hs-var">doc</span></a></span><span> </span><span class="hs-special">;</span><span>
</span><span id="line-1045"></span><span>         </span><span class="annot"><span class="annottext">Handle -&gt; IO ()
</span><a href="../../base/src/GHC.IO.Handle.html#hFlush"><span class="hs-identifier hs-var">hFlush</span></a></span><span> </span><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621680783341"><span class="hs-identifier hs-var">hdl</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-1046"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1047"></span><span>    </span><span id="local-6989586621680783339"><span class="annot"><span class="annottext">put :: TextDetails -&gt; IO b -&gt; IO b
</span><a href="#local-6989586621680783339"><span class="hs-identifier hs-var hs-var">put</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Chr"><span class="hs-identifier hs-type">Chr</span></a></span><span> </span><span id="local-6989586621680783331"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621680783331"><span class="hs-identifier hs-var">c</span></a></span></span><span class="hs-special">)</span><span>    </span><span id="local-6989586621680783330"><span class="annot"><span class="annottext">IO b
</span><a href="#local-6989586621680783330"><span class="hs-identifier hs-var">next</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Handle -&gt; Char -&gt; IO ()
</span><a href="../../base/src/GHC.IO.Handle.Text.html#hPutChar"><span class="hs-identifier hs-var">hPutChar</span></a></span><span> </span><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621680783341"><span class="hs-identifier hs-var">hdl</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621680783331"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">IO () -&gt; IO b -&gt; IO b
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">IO b
</span><a href="#local-6989586621680783330"><span class="hs-identifier hs-var">next</span></a></span><span>
</span><span id="line-1048"></span><span>    </span><span class="annot"><a href="#local-6989586621680783339"><span class="hs-identifier hs-var">put</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Str"><span class="hs-identifier hs-type">Str</span></a></span><span> </span><span id="local-6989586621680783328"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680783328"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">)</span><span>    </span><span id="local-6989586621680783327"><span class="annot"><span class="annottext">IO b
</span><a href="#local-6989586621680783327"><span class="hs-identifier hs-var">next</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Handle -&gt; String -&gt; IO ()
</span><a href="../../base/src/GHC.IO.Handle.Text.html#hPutStr"><span class="hs-identifier hs-var">hPutStr</span></a></span><span>  </span><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621680783341"><span class="hs-identifier hs-var">hdl</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680783328"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">IO () -&gt; IO b -&gt; IO b
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">IO b
</span><a href="#local-6989586621680783327"><span class="hs-identifier hs-var">next</span></a></span><span>
</span><span id="line-1049"></span><span>    </span><span class="annot"><a href="#local-6989586621680783339"><span class="hs-identifier hs-var">put</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#PStr"><span class="hs-identifier hs-type">PStr</span></a></span><span> </span><span id="local-6989586621680783325"><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680783325"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">)</span><span>   </span><span id="local-6989586621680783324"><span class="annot"><span class="annottext">IO b
</span><a href="#local-6989586621680783324"><span class="hs-identifier hs-var">next</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Handle -&gt; String -&gt; IO ()
</span><a href="../../base/src/GHC.IO.Handle.Text.html#hPutStr"><span class="hs-identifier hs-var">hPutStr</span></a></span><span>  </span><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621680783341"><span class="hs-identifier hs-var">hdl</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FastString -&gt; String
</span><a href="GHC.Data.FastString.html#unpackFS"><span class="hs-identifier hs-var">unpackFS</span></a></span><span> </span><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680783325"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">IO () -&gt; IO b -&gt; IO b
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">IO b
</span><a href="#local-6989586621680783324"><span class="hs-identifier hs-var">next</span></a></span><span>
</span><span id="line-1050"></span><span>                          </span><span class="hs-comment">-- NB. not hPutFS, we want this to go through</span><span>
</span><span id="line-1051"></span><span>                          </span><span class="hs-comment">-- the I/O library's encoding layer. (#3398)</span><span>
</span><span id="line-1052"></span><span>    </span><span class="annot"><a href="#local-6989586621680783339"><span class="hs-identifier hs-var">put</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#ZStr"><span class="hs-identifier hs-type">ZStr</span></a></span><span> </span><span id="local-6989586621680783323"><span class="annot"><span class="annottext">FastZString
</span><a href="#local-6989586621680783323"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">)</span><span>   </span><span id="local-6989586621680783322"><span class="annot"><span class="annottext">IO b
</span><a href="#local-6989586621680783322"><span class="hs-identifier hs-var">next</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Handle -&gt; FastZString -&gt; IO ()
</span><a href="GHC.Data.FastString.html#hPutFZS"><span class="hs-identifier hs-var">hPutFZS</span></a></span><span>  </span><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621680783341"><span class="hs-identifier hs-var">hdl</span></a></span><span> </span><span class="annot"><span class="annottext">FastZString
</span><a href="#local-6989586621680783323"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">IO () -&gt; IO b -&gt; IO b
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">IO b
</span><a href="#local-6989586621680783322"><span class="hs-identifier hs-var">next</span></a></span><span>
</span><span id="line-1053"></span><span>    </span><span class="annot"><a href="#local-6989586621680783339"><span class="hs-identifier hs-var">put</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#LStr"><span class="hs-identifier hs-type">LStr</span></a></span><span> </span><span id="local-6989586621680783320"><span class="annot"><span class="annottext">PtrString
</span><a href="#local-6989586621680783320"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">)</span><span>   </span><span id="local-6989586621680783319"><span class="annot"><span class="annottext">IO b
</span><a href="#local-6989586621680783319"><span class="hs-identifier hs-var">next</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Handle -&gt; PtrString -&gt; IO ()
</span><a href="GHC.Utils.Ppr.html#hPutPtrString"><span class="hs-identifier hs-var">hPutPtrString</span></a></span><span> </span><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621680783341"><span class="hs-identifier hs-var">hdl</span></a></span><span> </span><span class="annot"><span class="annottext">PtrString
</span><a href="#local-6989586621680783320"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">IO () -&gt; IO b -&gt; IO b
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">IO b
</span><a href="#local-6989586621680783319"><span class="hs-identifier hs-var">next</span></a></span><span>
</span><span id="line-1054"></span><span>    </span><span class="annot"><a href="#local-6989586621680783339"><span class="hs-identifier hs-var">put</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#RStr"><span class="hs-identifier hs-type">RStr</span></a></span><span> </span><span id="local-6989586621680783317"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783317"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621680783316"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621680783316"><span class="hs-identifier hs-var">c</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680783315"><span class="annot"><span class="annottext">IO b
</span><a href="#local-6989586621680783315"><span class="hs-identifier hs-var">next</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Handle -&gt; String -&gt; IO ()
</span><a href="../../base/src/GHC.IO.Handle.Text.html#hPutStr"><span class="hs-identifier hs-var">hPutStr</span></a></span><span> </span><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621680783341"><span class="hs-identifier hs-var">hdl</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Char -&gt; String
forall a. Int -&gt; a -&gt; [a]
</span><a href="../../base/src/GHC.List.html#replicate"><span class="hs-identifier hs-var">replicate</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783317"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621680783316"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">IO () -&gt; IO b -&gt; IO b
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">IO b
</span><a href="#local-6989586621680783315"><span class="hs-identifier hs-var">next</span></a></span><span>
</span><span id="line-1055"></span><span>
</span><span id="line-1056"></span><span>    </span><span id="local-6989586621680783338"><span class="annot"><span class="annottext">done :: IO ()
</span><a href="#local-6989586621680783338"><span class="hs-identifier hs-var hs-var">done</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">() -&gt; IO ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span> </span><span class="hs-comment">-- hPutChar hdl '\n'</span><span>
</span><span id="line-1057"></span><span>
</span><span id="line-1058"></span><span>  </span><span class="hs-comment">-- some versions of hPutBuf will barf if the length is zero</span><span>
</span><span id="line-1059"></span><span class="annot"><a href="GHC.Utils.Ppr.html#hPutPtrString"><span class="hs-identifier hs-type">hPutPtrString</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.Handle.Types.html#Handle"><span class="hs-identifier hs-type">Handle</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Data.FastString.html#PtrString"><span class="hs-identifier hs-type">PtrString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-1060"></span><span id="hPutPtrString"><span class="annot"><span class="annottext">hPutPtrString :: Handle -&gt; PtrString -&gt; IO ()
</span><a href="GHC.Utils.Ppr.html#hPutPtrString"><span class="hs-identifier hs-var hs-var">hPutPtrString</span></a></span></span><span> </span><span id="local-6989586621680783313"><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621680783313"><span class="hs-identifier hs-var">_handle</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Data.FastString.html#PtrString"><span class="hs-identifier hs-type">PtrString</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr Word8
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">() -&gt; IO ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-1061"></span><span class="annot"><a href="GHC.Utils.Ppr.html#hPutPtrString"><span class="hs-identifier hs-var">hPutPtrString</span></a></span><span> </span><span id="local-6989586621680783312"><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621680783312"><span class="hs-identifier hs-var">handle</span></a></span></span><span>  </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Data.FastString.html#PtrString"><span class="hs-identifier hs-type">PtrString</span></a></span><span> </span><span id="local-6989586621680783311"><span class="annot"><span class="annottext">Ptr Word8
</span><a href="#local-6989586621680783311"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621680783310"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783310"><span class="hs-identifier hs-var">l</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Handle -&gt; Ptr Word8 -&gt; Int -&gt; IO ()
forall a. Handle -&gt; Ptr a -&gt; Int -&gt; IO ()
</span><a href="../../base/src/GHC.IO.Handle.Text.html#hPutBuf"><span class="hs-identifier hs-var">hPutBuf</span></a></span><span> </span><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621680783312"><span class="hs-identifier hs-var">handle</span></a></span><span> </span><span class="annot"><span class="annottext">Ptr Word8
</span><a href="#local-6989586621680783311"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783310"><span class="hs-identifier hs-var">l</span></a></span><span>
</span><span id="line-1062"></span><span>
</span><span id="line-1063"></span><span class="hs-comment">-- Printing output in LeftMode is performance critical: it's used when</span><span>
</span><span id="line-1064"></span><span class="hs-comment">-- dumping C and assembly output, so we allow ourselves a few dirty</span><span>
</span><span id="line-1065"></span><span class="hs-comment">-- hacks:</span><span>
</span><span id="line-1066"></span><span class="hs-comment">--</span><span>
</span><span id="line-1067"></span><span class="hs-comment">-- (1) we specialise fullRender for LeftMode with IO output.</span><span>
</span><span id="line-1068"></span><span class="hs-comment">--</span><span>
</span><span id="line-1069"></span><span class="hs-comment">-- (2) we add a layer of buffering on top of Handles.  Handles</span><span>
</span><span id="line-1070"></span><span class="hs-comment">--     don't perform well with lots of hPutChars, which is mostly</span><span>
</span><span id="line-1071"></span><span class="hs-comment">--     what we're doing here, because Handles have to be thread-safe</span><span>
</span><span id="line-1072"></span><span class="hs-comment">--     and async exception-safe.  We only have a single thread and don't</span><span>
</span><span id="line-1073"></span><span class="hs-comment">--     care about exceptions, so we add a layer of fast buffering</span><span>
</span><span id="line-1074"></span><span class="hs-comment">--     over the Handle interface.</span><span>
</span><span id="line-1075"></span><span>
</span><span id="line-1076"></span><span class="annot"><a href="GHC.Utils.Ppr.html#printLeftRender"><span class="hs-identifier hs-type">printLeftRender</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.Handle.Types.html#Handle"><span class="hs-identifier hs-type">Handle</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-1077"></span><span id="printLeftRender"><span class="annot"><span class="annottext">printLeftRender :: Handle -&gt; Doc -&gt; IO ()
</span><a href="GHC.Utils.Ppr.html#printLeftRender"><span class="hs-identifier hs-var hs-var">printLeftRender</span></a></span></span><span> </span><span id="local-6989586621680783308"><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621680783308"><span class="hs-identifier hs-var">hdl</span></a></span></span><span> </span><span id="local-6989586621680783307"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783307"><span class="hs-identifier hs-var">doc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-1078"></span><span>  </span><span id="local-6989586621680783306"><span class="annot"><span class="annottext">BufHandle
</span><a href="#local-6989586621680783306"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Handle -&gt; IO BufHandle
</span><a href="GHC.Utils.BufHandle.html#newBufHandle"><span class="hs-identifier hs-var">newBufHandle</span></a></span><span> </span><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621680783308"><span class="hs-identifier hs-var">hdl</span></a></span><span>
</span><span id="line-1079"></span><span>  </span><span class="annot"><span class="annottext">BufHandle -&gt; Doc -&gt; IO ()
</span><a href="GHC.Utils.Ppr.html#bufLeftRender"><span class="hs-identifier hs-var">bufLeftRender</span></a></span><span> </span><span class="annot"><span class="annottext">BufHandle
</span><a href="#local-6989586621680783306"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783307"><span class="hs-identifier hs-var">doc</span></a></span><span>
</span><span id="line-1080"></span><span>  </span><span class="annot"><span class="annottext">BufHandle -&gt; IO ()
</span><a href="GHC.Utils.BufHandle.html#bFlush"><span class="hs-identifier hs-var">bFlush</span></a></span><span> </span><span class="annot"><span class="annottext">BufHandle
</span><a href="#local-6989586621680783306"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-1081"></span><span>
</span><span id="line-1082"></span><span class="annot"><a href="GHC.Utils.Ppr.html#bufLeftRender"><span class="hs-identifier hs-type">bufLeftRender</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.BufHandle.html#BufHandle"><span class="hs-identifier hs-type">BufHandle</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-1083"></span><span id="bufLeftRender"><span class="annot"><span class="annottext">bufLeftRender :: BufHandle -&gt; Doc -&gt; IO ()
</span><a href="GHC.Utils.Ppr.html#bufLeftRender"><span class="hs-identifier hs-var hs-var">bufLeftRender</span></a></span></span><span> </span><span id="local-6989586621680783303"><span class="annot"><span class="annottext">BufHandle
</span><a href="#local-6989586621680783303"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span id="local-6989586621680783302"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783302"><span class="hs-identifier hs-var">doc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BufHandle -&gt; Doc -&gt; IO ()
</span><a href="GHC.Utils.Ppr.html#layLeft"><span class="hs-identifier hs-var">layLeft</span></a></span><span> </span><span class="annot"><span class="annottext">BufHandle
</span><a href="#local-6989586621680783303"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#reduceDoc"><span class="hs-identifier hs-var">reduceDoc</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783302"><span class="hs-identifier hs-var">doc</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1084"></span><span>
</span><span id="line-1085"></span><span class="annot"><a href="GHC.Utils.Ppr.html#layLeft"><span class="hs-identifier hs-type">layLeft</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.BufHandle.html#BufHandle"><span class="hs-identifier hs-type">BufHandle</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Ppr.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-1086"></span><span id="layLeft"><span class="annot"><span class="annottext">layLeft :: BufHandle -&gt; Doc -&gt; IO ()
</span><a href="GHC.Utils.Ppr.html#layLeft"><span class="hs-identifier hs-var hs-var">layLeft</span></a></span></span><span> </span><span id="local-6989586621680783300"><span class="annot"><span class="annottext">BufHandle
</span><a href="#local-6989586621680783300"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BufHandle
</span><a href="#local-6989586621680783300"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">BufHandle -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">`seq`</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IO ()
forall a. HasCallStack =&gt; a
</span><a href="../../base/src/GHC.Err.html#undefined"><span class="hs-identifier hs-var">undefined</span></a></span><span> </span><span class="hs-comment">-- make it strict in b</span><span>
</span><span id="line-1087"></span><span class="annot"><a href="GHC.Utils.Ppr.html#layLeft"><span class="hs-identifier hs-var">layLeft</span></a></span><span> </span><span class="annot"><span class="annottext">BufHandle
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#NoDoc"><span class="hs-identifier hs-var">NoDoc</span></a></span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; IO ()
forall a. String -&gt; a
</span><a href="GHC.Utils.Ppr.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;layLeft: NoDoc&quot;</span></span><span>
</span><span id="line-1088"></span><span class="annot"><a href="GHC.Utils.Ppr.html#layLeft"><span class="hs-identifier hs-var">layLeft</span></a></span><span> </span><span id="local-6989586621680783299"><span class="annot"><span class="annottext">BufHandle
</span><a href="#local-6989586621680783299"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Union"><span class="hs-identifier hs-type">Union</span></a></span><span> </span><span id="local-6989586621680783298"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783298"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621680783297"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783297"><span class="hs-identifier hs-var">q</span></a></span></span><span class="hs-special">)</span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BufHandle -&gt; Doc -&gt; IO ()
</span><a href="GHC.Utils.Ppr.html#layLeft"><span class="hs-identifier hs-var">layLeft</span></a></span><span> </span><span class="annot"><span class="annottext">BufHandle
</span><a href="#local-6989586621680783299"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">(Doc -&gt; IO ()) -&gt; Doc -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24%21"><span class="hs-operator hs-var">$!</span></a></span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc -&gt; Doc
</span><a href="GHC.Utils.Ppr.html#first"><span class="hs-identifier hs-var">first</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783298"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783297"><span class="hs-identifier hs-var">q</span></a></span><span>
</span><span id="line-1089"></span><span class="annot"><a href="GHC.Utils.Ppr.html#layLeft"><span class="hs-identifier hs-var">layLeft</span></a></span><span> </span><span id="local-6989586621680783296"><span class="annot"><span class="annottext">BufHandle
</span><a href="#local-6989586621680783296"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Nest"><span class="hs-identifier hs-type">Nest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680783295"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783295"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">)</span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BufHandle -&gt; Doc -&gt; IO ()
</span><a href="GHC.Utils.Ppr.html#layLeft"><span class="hs-identifier hs-var">layLeft</span></a></span><span> </span><span class="annot"><span class="annottext">BufHandle
</span><a href="#local-6989586621680783296"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">(Doc -&gt; IO ()) -&gt; Doc -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24%21"><span class="hs-operator hs-var">$!</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783295"><span class="hs-identifier hs-var">p</span></a></span><span>
</span><span id="line-1090"></span><span class="annot"><a href="GHC.Utils.Ppr.html#layLeft"><span class="hs-identifier hs-var">layLeft</span></a></span><span> </span><span id="local-6989586621680783294"><span class="annot"><span class="annottext">BufHandle
</span><a href="#local-6989586621680783294"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="GHC.Utils.Ppr.html#Empty"><span class="hs-identifier hs-var">Empty</span></a></span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BufHandle -&gt; Char -&gt; IO ()
</span><a href="GHC.Utils.BufHandle.html#bPutChar"><span class="hs-identifier hs-var">bPutChar</span></a></span><span> </span><span class="annot"><span class="annottext">BufHandle
</span><a href="#local-6989586621680783294"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\n'</span></span><span>
</span><span id="line-1091"></span><span class="annot"><a href="GHC.Utils.Ppr.html#layLeft"><span class="hs-identifier hs-var">layLeft</span></a></span><span> </span><span id="local-6989586621680783292"><span class="annot"><span class="annottext">BufHandle
</span><a href="#local-6989586621680783292"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#NilAbove"><span class="hs-identifier hs-type">NilAbove</span></a></span><span> </span><span id="local-6989586621680783291"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783291"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">)</span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783291"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Doc -&gt; IO () -&gt; IO ()
</span><span class="hs-operator hs-var">`seq`</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BufHandle -&gt; Char -&gt; IO ()
</span><a href="GHC.Utils.BufHandle.html#bPutChar"><span class="hs-identifier hs-var">bPutChar</span></a></span><span> </span><span class="annot"><span class="annottext">BufHandle
</span><a href="#local-6989586621680783292"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\n'</span></span><span> </span><span class="annot"><span class="annottext">IO () -&gt; IO () -&gt; IO ()
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">BufHandle -&gt; Doc -&gt; IO ()
</span><a href="GHC.Utils.Ppr.html#layLeft"><span class="hs-identifier hs-var">layLeft</span></a></span><span> </span><span class="annot"><span class="annottext">BufHandle
</span><a href="#local-6989586621680783292"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783291"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1092"></span><span class="annot"><a href="GHC.Utils.Ppr.html#layLeft"><span class="hs-identifier hs-var">layLeft</span></a></span><span> </span><span id="local-6989586621680783290"><span class="annot"><span class="annottext">BufHandle
</span><a href="#local-6989586621680783290"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#TextBeside"><span class="hs-identifier hs-type">TextBeside</span></a></span><span> </span><span id="local-6989586621680783289"><span class="annot"><span class="annottext">TextDetails
</span><a href="#local-6989586621680783289"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680783288"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783288"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TextDetails
</span><a href="#local-6989586621680783289"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">TextDetails -&gt; IO () -&gt; IO ()
</span><span class="hs-operator hs-var">`seq`</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BufHandle -&gt; TextDetails -&gt; IO ()
</span><a href="#local-6989586621680783287"><span class="hs-identifier hs-var">put</span></a></span><span> </span><span class="annot"><span class="annottext">BufHandle
</span><a href="#local-6989586621680783290"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">TextDetails
</span><a href="#local-6989586621680783289"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">IO () -&gt; IO () -&gt; IO ()
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">BufHandle -&gt; Doc -&gt; IO ()
</span><a href="GHC.Utils.Ppr.html#layLeft"><span class="hs-identifier hs-var">layLeft</span></a></span><span> </span><span class="annot"><span class="annottext">BufHandle
</span><a href="#local-6989586621680783290"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621680783288"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1093"></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-1094"></span><span>    </span><span id="local-6989586621680783287"><span class="annot"><span class="annottext">put :: BufHandle -&gt; TextDetails -&gt; IO ()
</span><a href="#local-6989586621680783287"><span class="hs-identifier hs-var hs-var">put</span></a></span></span><span> </span><span id="local-6989586621680783284"><span class="annot"><span class="annottext">BufHandle
</span><a href="#local-6989586621680783284"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="annot"><span class="annottext">TextDetails
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">BufHandle
</span><a href="#local-6989586621680783284"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">BufHandle -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">`seq`</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IO ()
forall a. HasCallStack =&gt; a
</span><a href="../../base/src/GHC.Err.html#undefined"><span class="hs-identifier hs-var">undefined</span></a></span><span>
</span><span id="line-1095"></span><span>    </span><span class="annot"><a href="#local-6989586621680783287"><span class="hs-identifier hs-var">put</span></a></span><span> </span><span id="local-6989586621680783283"><span class="annot"><span class="annottext">BufHandle
</span><a href="#local-6989586621680783283"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Chr"><span class="hs-identifier hs-type">Chr</span></a></span><span> </span><span id="local-6989586621680783282"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621680783282"><span class="hs-identifier hs-var">c</span></a></span></span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BufHandle -&gt; Char -&gt; IO ()
</span><a href="GHC.Utils.BufHandle.html#bPutChar"><span class="hs-identifier hs-var">bPutChar</span></a></span><span> </span><span class="annot"><span class="annottext">BufHandle
</span><a href="#local-6989586621680783283"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621680783282"><span class="hs-identifier hs-var">c</span></a></span><span>
</span><span id="line-1096"></span><span>    </span><span class="annot"><a href="#local-6989586621680783287"><span class="hs-identifier hs-var">put</span></a></span><span> </span><span id="local-6989586621680783281"><span class="annot"><span class="annottext">BufHandle
</span><a href="#local-6989586621680783281"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#Str"><span class="hs-identifier hs-type">Str</span></a></span><span> </span><span id="local-6989586621680783280"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680783280"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BufHandle -&gt; String -&gt; IO ()
</span><a href="GHC.Utils.BufHandle.html#bPutStr"><span class="hs-identifier hs-var">bPutStr</span></a></span><span>  </span><span class="annot"><span class="annottext">BufHandle
</span><a href="#local-6989586621680783281"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680783280"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-1097"></span><span>    </span><span class="annot"><a href="#local-6989586621680783287"><span class="hs-identifier hs-var">put</span></a></span><span> </span><span id="local-6989586621680783278"><span class="annot"><span class="annottext">BufHandle
</span><a href="#local-6989586621680783278"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#PStr"><span class="hs-identifier hs-type">PStr</span></a></span><span> </span><span id="local-6989586621680783277"><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680783277"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BufHandle -&gt; FastString -&gt; IO ()
</span><a href="GHC.Utils.BufHandle.html#bPutFS"><span class="hs-identifier hs-var">bPutFS</span></a></span><span>   </span><span class="annot"><span class="annottext">BufHandle
</span><a href="#local-6989586621680783278"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680783277"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-1098"></span><span>    </span><span class="annot"><a href="#local-6989586621680783287"><span class="hs-identifier hs-var">put</span></a></span><span> </span><span id="local-6989586621680783275"><span class="annot"><span class="annottext">BufHandle
</span><a href="#local-6989586621680783275"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#ZStr"><span class="hs-identifier hs-type">ZStr</span></a></span><span> </span><span id="local-6989586621680783274"><span class="annot"><span class="annottext">FastZString
</span><a href="#local-6989586621680783274"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BufHandle -&gt; FastZString -&gt; IO ()
</span><a href="GHC.Utils.BufHandle.html#bPutFZS"><span class="hs-identifier hs-var">bPutFZS</span></a></span><span>  </span><span class="annot"><span class="annottext">BufHandle
</span><a href="#local-6989586621680783275"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">FastZString
</span><a href="#local-6989586621680783274"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-1099"></span><span>    </span><span class="annot"><a href="#local-6989586621680783287"><span class="hs-identifier hs-var">put</span></a></span><span> </span><span id="local-6989586621680783272"><span class="annot"><span class="annottext">BufHandle
</span><a href="#local-6989586621680783272"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#LStr"><span class="hs-identifier hs-type">LStr</span></a></span><span> </span><span id="local-6989586621680783271"><span class="annot"><span class="annottext">PtrString
</span><a href="#local-6989586621680783271"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BufHandle -&gt; PtrString -&gt; IO ()
</span><a href="GHC.Utils.BufHandle.html#bPutPtrString"><span class="hs-identifier hs-var">bPutPtrString</span></a></span><span> </span><span class="annot"><span class="annottext">BufHandle
</span><a href="#local-6989586621680783272"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">PtrString
</span><a href="#local-6989586621680783271"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-1100"></span><span>    </span><span class="annot"><a href="#local-6989586621680783287"><span class="hs-identifier hs-var">put</span></a></span><span> </span><span id="local-6989586621680783269"><span class="annot"><span class="annottext">BufHandle
</span><a href="#local-6989586621680783269"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Ppr.html#RStr"><span class="hs-identifier hs-type">RStr</span></a></span><span> </span><span id="local-6989586621680783268"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783268"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621680783267"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621680783267"><span class="hs-identifier hs-var">c</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BufHandle -&gt; Int -&gt; Char -&gt; IO ()
</span><a href="GHC.Utils.BufHandle.html#bPutReplicate"><span class="hs-identifier hs-var">bPutReplicate</span></a></span><span> </span><span class="annot"><span class="annottext">BufHandle
</span><a href="#local-6989586621680783269"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680783268"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621680783267"><span class="hs-identifier hs-var">c</span></a></span><span>
</span><span id="line-1101"></span><span class="annot"><a href="GHC.Utils.Ppr.html#layLeft"><span class="hs-identifier hs-var">layLeft</span></a></span><span> </span><span class="annot"><span class="annottext">BufHandle
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><span class="hs-identifier">_</span></span><span>                  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; IO ()
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;layLeft: Unhandled case&quot;</span></span><span>
</span><span id="line-1102"></span><span>
</span><span id="line-1103"></span><span class="hs-comment">-- Define error=panic, for easier comparison with libraries/pretty.</span><span>
</span><span id="line-1104"></span><span id="local-6989586621680784035"><span class="annot"><a href="GHC.Utils.Ppr.html#error"><span class="hs-identifier hs-type">error</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680784035"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-1105"></span><span id="error"><span class="annot"><span class="annottext">error :: forall a. String -&gt; a
</span><a href="GHC.Utils.Ppr.html#error"><span class="hs-identifier hs-var hs-var">error</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; a
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span>
</span><span id="line-1106"></span></pre></body></html>